CoreFiles by mySites.guru
GreaterThanValidator.php31 lines, 767 bytes, from Joomla_5.3.0-Stable-Full_Package.zip
Raw History Compare with 5.2.6
md5
54b07d76fb93ad1f1468f638de0a1486
sha1
9e872627beb4fea6f2a3ebf5787d829854d31864
sha256
2ad586c531476f10f5cfa333b1bcd94fec7b9185ef0c0e0e3c1c71e546339a5b
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Validator\Constraints;

/**
 * Validates values are greater than the previous (>).
 *
 * @author Daniel Holmes <[email protected]>
 * @author Bernhard Schussek <[email protected]>
 */
class GreaterThanValidator extends AbstractComparisonValidator
{
    protected function compareValues(mixed $value1, mixed $value2): bool
    {
        return null === $value2 || $value1 > $value2;
    }

    protected function getErrorCode(): ?string
    {
        return GreaterThan::TOO_LOW_ERROR;
    }
}

The same content is in 136 releases, Joomla 5.1.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.