mirror of
https://github.com/Respect/Validation.git
synced 2026-03-16 23:35:45 +01:00
These two branches are very different, therefore merging is becoming
very hard.
I decided to not put these changes together with 5750952 because it
seems easy to track these changes with a specific commit.
While working on this merge I realized that would make more sense to
create "AbstractComparison" to handle the rules that compare values.
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
30 lines
620 B
PHP
30 lines
620 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Respect/Validation.
|
|
*
|
|
* (c) Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
|
|
*
|
|
* For the full copyright and license information, please view the "LICENSE.md"
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Respect\Validation\Rules;
|
|
|
|
/**
|
|
* Validates whether the input is less than a value.
|
|
*
|
|
* @author Henrique Moody <henriquemoody@gmail.com>
|
|
*/
|
|
final class GreaterThan extends AbstractComparison
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function compare($left, $right): bool
|
|
{
|
|
return $left > $right;
|
|
}
|
|
}
|