1 | <?php |
||
18 | class VerifyOrDie |
||
19 | { |
||
20 | /** |
||
21 | * Portable basename |
||
22 | * |
||
23 | * @param string $basename |
||
24 | * @param string $message [optional] |
||
|
|||
25 | * @return string |
||
26 | */ |
||
27 | public static function filename($basename, $message = null) |
||
49 | |||
50 | /** |
||
51 | * @param string $name |
||
52 | * @param string $internalType |
||
53 | * @param mixed $subject |
||
54 | */ |
||
55 | public static function argumentType($name, $internalType, $subject) |
||
64 | |||
65 | /** |
||
66 | * @param string $message |
||
67 | */ |
||
68 | private static function violation($message) |
||
72 | } |
||
73 |
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.