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 |
||
| 23 | abstract class AbstractComparison extends AbstractRule |
||
| 24 | { |
||
| 25 | use ComparisonHelper; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var mixed |
||
| 29 | */ |
||
| 30 | private $compareTo; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Initializes the rule by setting the value to be compared to the input. |
||
| 34 | * |
||
| 35 | * @param mixed $maxValue |
||
| 36 | */ |
||
| 37 | 12 | public function __construct($maxValue) |
|
| 40 | 12 | } |
|
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritdoc} |
||
| 44 | */ |
||
| 45 | 82 | public function validate($input): bool |
|
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Compare both values and return whether the comparison is valid or not. |
||
| 59 | * |
||
| 60 | * @param mixed $left |
||
| 61 | * @param mixed $right |
||
| 62 | * |
||
| 63 | * @return bool |
||
| 64 | */ |
||
| 65 | abstract protected function compare($left, $right): bool; |
||
| 66 | } |
||
| 67 |