1 | <?php |
||
24 | class UnsupportedVersionException extends RuntimeException |
||
25 | { |
||
26 | /** |
||
27 | * Creates an exception for an unknown version. |
||
28 | * |
||
29 | * @param string $version The version that caused the |
||
30 | * exception. |
||
31 | * @param string[] $knownVersions The known versions. |
||
32 | * @param string $path The path of the read module file. |
||
|
|||
33 | * @param Exception|null $cause The exception that caused this |
||
34 | * exception. |
||
35 | * |
||
36 | * @return static The created exception. |
||
37 | */ |
||
38 | public static function forVersion($version, array $knownVersions, $path = null, Exception $cause = null) |
||
53 | } |
||
54 |
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.