Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
14 | 85 | public function __construct($value) |
|
15 | { |
||
16 | $options = array( |
||
17 | 'options' => array( |
||
18 | 'min_range' => 0 |
||
19 | 85 | ) |
|
20 | 85 | ); |
|
21 | |||
22 | 85 | $filteredValue = filter_var($value, FILTER_VALIDATE_INT, $options); |
|
23 | |||
24 | 85 | if (false === $filteredValue) { |
|
25 | 2 | throw new InvalidNativeArgumentException($value, array('int (>=0)')); |
|
26 | } |
||
27 | |||
28 | 83 | parent::__construct($filteredValue); |
|
29 | 83 | } |
|
30 | } |
||
31 |