Total Complexity | 4 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Coverage | 90% |
Changes | 0 |
1 | <?php |
||
7 | class GreaterThanValidator extends ValidatorHasNotNull { |
||
8 | protected $ref; |
||
9 | |||
10 | 1 | public function __construct() { |
|
12 | 1 | } |
|
13 | |||
14 | 1 | public function validate($value) { |
|
15 | 1 | parent::validate ( $value ); |
|
16 | 1 | if ($this->notNull !== false) { |
|
17 | 1 | return $value > $this->ref; |
|
18 | } |
||
19 | return true; |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * |
||
24 | * {@inheritdoc} |
||
25 | * @see \Ubiquity\contents\validation\validators\Validator::getParameters() |
||
26 | */ |
||
27 | 1 | public function getParameters(): array { |
|
29 | } |
||
30 | } |
||
32 |