CoreFiles by mySites.guru
GreaterThanOrEqualValidator.php31 lines, 795 bytes, from Joomla_5.3.4-Stable-Full_Package.zip
Raw History Compare with 5.3.3
md5
078ff6e231498636d8c1864d9d8a3fa3
sha1
6299b00b443e996d2ecff26dc285606a6c7bab78
sha256
562ca412935afd8cbdd35d52f3cc37a3fc3844b36a1a04d1aaf558b44b45aa44
<?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 or equal to the previous (>=).
 *
 * @author Daniel Holmes <[email protected]>
 * @author Bernhard Schussek <[email protected]>
 */
class GreaterThanOrEqualValidator extends AbstractComparisonValidator
{
    protected function compareValues(mixed $value1, mixed $value2): bool
    {
        return null === $value2 || $value1 >= $value2;
    }

    protected function getErrorCode(): ?string
    {
        return GreaterThanOrEqual::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.