1 | <?php |
||
12 | class DummyFileReaderFactory implements IFileReaderFactory |
||
13 | { |
||
14 | /** |
||
15 | * @var IFileReader |
||
16 | */ |
||
17 | private $fileReader; |
||
18 | |||
19 | /** |
||
20 | * @param IFileReader $fileReader |
||
|
|||
21 | */ |
||
22 | public function __construct(IFileReader $fileReader = null) |
||
26 | |||
27 | /** |
||
28 | * @param string $filePath |
||
29 | * @return IFileReader |
||
30 | */ |
||
31 | public function create($filePath) |
||
35 | } |
||
36 |
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.