1 | <?php |
||
11 | class YmlFileReader implements IFileReader |
||
12 | { |
||
13 | /** |
||
14 | * @var Parser |
||
15 | */ |
||
16 | private $yaml; |
||
17 | |||
18 | /** |
||
19 | * @param Parser $yaml |
||
|
|||
20 | */ |
||
21 | 2 | public function __construct(Parser $yaml = null) |
|
25 | |||
26 | /** |
||
27 | * @return string |
||
28 | */ |
||
29 | 1 | public function getFileExtension() |
|
33 | |||
34 | /** |
||
35 | * @param $filePath |
||
36 | * @return array |
||
37 | */ |
||
38 | 1 | public function read($filePath) |
|
42 | } |
||
43 |
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.