GreaterThan.php 475 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /*
  3. * Copyright (c) Alexandre Gomes Gaigalas <alganet@gmail.com>
  4. * SPDX-License-Identifier: MIT
  5. */
  6. declare(strict_types=1);
  7. namespace Respect\Validation\Rules;
  8. /**
  9. * Validates whether the input is less than a value.
  10. *
  11. * @author Henrique Moody <henriquemoody@gmail.com>
  12. */
  13. final class GreaterThan extends AbstractComparison
  14. {
  15. /**
  16. * {@inheritDoc}
  17. */
  18. protected function compare($left, $right): bool
  19. {
  20. return $left > $right;
  21. }
  22. }