| 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 | 30 | public static function countryMismatch($number, $countries) |
|
| 44 | { |
||
| 45 | 30 | $countries = array_filter(is_array($countries) ? $countries : [$countries]); |
|
| 46 | |||
| 47 | 30 | $exception = new static( |
|
| 48 | 30 | libNumberParseException::INVALID_COUNTRY_CODE, |
|
| 49 | 30 | 'Number does not match the provided '. Str::plural('country', count($countries)).'.' |
|
| 50 | ); |
||
| 51 | |||
| 52 | 30 | $exception->number = $number; |
|
| 53 | 30 | $exception->countries = $countries; |
|
| 54 | |||
| 55 | 30 | 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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.