| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 2 | public function __construct($value) |
|
| 33 | { |
||
| 34 | $options = array( |
||
| 35 | 2 | 'options' => array('min_range' => self::MIN, 'max_range' => self::MAX) |
|
| 36 | 2 | ); |
|
| 37 | |||
| 38 | 2 | $value = filter_var($value, FILTER_VALIDATE_INT, $options); |
|
| 39 | |||
| 40 | 2 | if (false === $value) { |
|
| 41 | 1 | throw new InvalidNativeArgumentException($value, array('int (>=' . self::MIN . ', <=' . self::MAX . ')')); |
|
| 42 | } |
||
| 43 | |||
| 44 | 1 | parent::__construct($value); |
|
| 45 | 1 | } |
|
| 46 | } |
||
| 47 |
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.