| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 31 | public function __construct($value) |
|
| 32 | { |
||
| 33 | $options = array( |
||
| 34 | 31 | 'options' => array('min_range' => self::MIN_HOUR, 'max_range' => self::MAX_HOUR) |
|
| 35 | 31 | ); |
|
| 36 | |||
| 37 | 31 | $filteredValue = filter_var($value, FILTER_VALIDATE_INT, $options); |
|
| 38 | |||
| 39 | 31 | if (false === $filteredValue) { |
|
| 40 | 1 | throw new InvalidNativeArgumentException($value, array('int (>=0, <=23)')); |
|
| 41 | } |
||
| 42 | |||
| 43 | 30 | parent::__construct($filteredValue); |
|
| 44 | 30 | } |
|
| 45 | |||
| 59 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.