| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | 4 | public function __construct($value) |
|
| 16 | { |
||
| 17 | $options = array( |
||
| 18 | 'options' => array( |
||
| 19 | 4 | 'min_range' => 100000000000000, |
|
| 20 | 'max_range' => 999999999999999 |
||
| 21 | 4 | ) |
|
| 22 | 4 | ); |
|
| 23 | |||
| 24 | 4 | $value = filter_var($value, FILTER_VALIDATE_INT, $options); |
|
| 25 | |||
| 26 | 4 | if (false === $value) { |
|
| 27 | 2 | throw new InvalidNativeArgumentException($value, array('int (15 digits)')); |
|
| 28 | } |
||
| 29 | |||
| 30 | 2 | $value = $this->validateLuhnAlgorithm($value); |
|
| 31 | |||
| 32 | 1 | $this->value = $value; |
|
| 33 | 1 | } |
|
| 34 | |||
| 57 |
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.