Drupal investigation

GreaterThanValidator.php 794B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Validator\Constraints;
  11. /**
  12. * Validates values are greater than the previous (>).
  13. *
  14. * @author Daniel Holmes <daniel@danielholmes.org>
  15. * @author Bernhard Schussek <bschussek@gmail.com>
  16. */
  17. class GreaterThanValidator extends AbstractComparisonValidator
  18. {
  19. /**
  20. * {@inheritdoc}
  21. */
  22. protected function compareValues($value1, $value2)
  23. {
  24. return $value1 > $value2;
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. protected function getErrorCode()
  30. {
  31. return GreaterThan::TOO_LOW_ERROR;
  32. }
  33. }