CoreFiles by mySites.guru
LesserOrEqualsTo.php34 lines, 792 bytes, from Joomla_4.2.2-Stable-Full_Package.zip
Raw History Compare with 4.2.1
md5
5a4c15c0b437360578bdff64c8920812
sha1
0dbf3ada3fcbcf53dff0863d5e5d6384666d405d
sha256
3278fdb60bec021dd37745b7c817b187d3eded36571a46a51b7bca0a99245ea6
<?php
/**
 * This file is part of Lcobucci\JWT, a simple library to handle JWT and JWS
 *
 * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
 */

namespace Lcobucci\JWT\Claim;

use Lcobucci\JWT\Claim;
use Lcobucci\JWT\ValidationData;

/**
 * Validatable claim that checks if value is lesser or equals to the given data
 *
 * @deprecated This class will be removed on v4
 *
 * @author Luís Otávio Cobucci Oblonczyk <[email protected]>
 * @since 2.0.0
 */
class LesserOrEqualsTo extends Basic implements Claim, Validatable
{
    /**
     * {@inheritdoc}
     */
    public function validate(ValidationData $data)
    {
        if ($data->has($this->getName())) {
            return $this->getValue() <= $data->get($this->getName());
        }

        return true;
    }
}

The same content is in 75 releases, Joomla 4.2.0-beta3 to 4.4.14. See them all, or every version of this file.