| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 4 | public function __construct($key, $invalidValue, $regexPattern, $code = 0, \Exception $previous = null) |
|
| 21 | { |
||
| 22 | 4 | $message = sprintf( |
|
| 23 | 4 | 'Invalid value (%1$s) for entry "%2$s", pattern is: "%3$s".', |
|
| 24 | 4 | $invalidValue, |
|
| 25 | 4 | $key, |
|
| 26 | $regexPattern |
||
| 27 | 4 | ); |
|
| 28 | 4 | parent::__construct($message, $code, $previous); |
|
| 29 | 4 | } |
|
| 30 | } |
||
| 31 |
This check looks for
@paramannotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.