Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
19 | 1 | public function __construct($invalidWeight, $maximumWeight, $code = 0, \Exception $previous = null) |
|
20 | { |
||
21 | 1 | $message = sprintf( |
|
22 | 1 | 'Invalid weight (%1$s kg), maximum is %2$s.', |
|
23 | 1 | $invalidWeight, |
|
24 | $maximumWeight |
||
25 | 1 | ); |
|
26 | 1 | parent::__construct($message, $code, $previous); |
|
27 | 1 | } |
|
28 | } |
||
29 |
This check looks for
@param
annotations 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.