Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | protected $errorMessage = "{name} must be integer"; |
||
14 | |||
15 | 22 | public function isValid(ValueObject $data) |
|
16 | { |
||
17 | 22 | if (is_bool($data->value())) return false; |
|
18 | 18 | return is_int($data->value()) || preg_match('/^\d+$/', $data->value()); |
|
19 | } |
||
20 | |||
21 | 11 | protected function afterSuccessValidation() |
|
22 | { |
||
27 | } |