We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Total Complexity | 3 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | abstract class AbstractComparison extends AbstractRule |
||
10 | { |
||
11 | use ComparisonHelper; |
||
12 | |||
13 | /** |
||
14 | * @var mixed |
||
15 | */ |
||
16 | private $compareTo; |
||
17 | |||
18 | /** |
||
19 | * Initializes the rule by setting the value to be compared to the input. |
||
20 | * |
||
21 | * @param mixed $maxValue |
||
22 | */ |
||
23 | 12 | public function __construct($maxValue) |
|
26 | 12 | } |
|
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | 82 | public function validate($input): bool |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * Compare both values and return whether the comparison is valid or not. |
||
45 | * |
||
46 | * @param mixed $left |
||
47 | * @param mixed $right |
||
48 | * |
||
49 | * @return bool |
||
50 | */ |
||
51 | abstract protected function compare($left, $right): bool; |
||
52 | } |
||
53 |