Conditions | 2 |
Paths | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php namespace Propaganistas\LaravelPhone\Exceptions; |
||
43 | 26 | public static function countryMismatch($number, $countries) |
|
44 | { |
||
45 | 26 | $countries = array_filter(is_array($countries) ? $countries : [$countries]); |
|
46 | |||
47 | 26 | $exception = new static( |
|
48 | 26 | libNumberParseException::INVALID_COUNTRY_CODE, |
|
49 | 26 | 'Number does not match the provided '. Str::plural('country', count($countries)).'.' |
|
50 | ); |
||
51 | |||
52 | 26 | $exception->number = $number; |
|
53 | 26 | $exception->countries = $countries; |
|
54 | |||
55 | 26 | return $exception; |
|
56 | } |
||
57 | |||
73 | } |
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
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.