1 | <?php |
||
17 | class FileReader implements ReaderInterface, LoggerAwareInterface |
||
18 | { |
||
19 | use OptionalLoggerTrait; |
||
20 | |||
21 | /** @var FileNodeInterface */ |
||
22 | private $file; |
||
23 | /** @var FormatInterface */ |
||
24 | private $format; |
||
25 | /** @var StreamReader */ |
||
26 | private $reader; |
||
27 | |||
28 | /** |
||
29 | * FileReader constructor. |
||
30 | * |
||
31 | * @param FileNodeInterface $file |
||
32 | * @param FormatInterface|null $format |
||
33 | * @param ParserFactoryInterface $parserFactory |
||
|
|||
34 | */ |
||
35 | 7 | public function __construct( |
|
64 | |||
65 | /** |
||
66 | * Fetch the next row from a result set |
||
67 | * |
||
68 | * @param callable|null $callable a callable function to be applied to each Iterator item |
||
69 | * |
||
70 | * @return Iterator |
||
71 | */ |
||
72 | 1 | public function fetch(callable $callable = null) |
|
76 | |||
77 | /** |
||
78 | * Returns a sequential array of all items |
||
79 | * |
||
80 | * The callable function will be applied to each Iterator item |
||
81 | * |
||
82 | * @param callable|null $callable a callable function |
||
83 | * |
||
84 | * @return array |
||
85 | */ |
||
86 | 1 | public function fetchAll(callable $callable = null) |
|
90 | } |
||
91 |
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.