| Total Complexity | 3 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class IntegerRule extends NumberRule implements IntegerRuleInterface |
||
| 10 | { |
||
| 11 | public const ERROR_NOT_INTEGER = 'not_integer'; |
||
| 12 | public const ERROR_NOT_EVEN = 'not_even'; |
||
| 13 | public const ERROR_NOT_ODD = 'not_odd'; |
||
| 14 | |||
| 15 | 40 | public function __construct() |
|
| 22 | 40 | )); |
|
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * {@inheritDoc} |
||
| 27 | * |
||
| 28 | * @return static |
||
| 29 | */ |
||
| 30 | 7 | public function even(): self |
|
| 35 | 7 | )); |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritDoc} |
||
| 40 | * |
||
| 41 | * @return static |
||
| 42 | */ |
||
| 43 | 10 | public function odd(): self |
|
| 51 |