1 | <?php |
||
27 | class FileWriter implements WriterInterface, LoggerAwareInterface |
||
28 | { |
||
29 | use OptionalLoggerTrait; |
||
30 | |||
31 | /** @var FileNodeInterface */ |
||
32 | private $file; |
||
33 | /** @var FormatInterface */ |
||
34 | private $format; |
||
35 | /** @var StreamReader */ |
||
36 | private $writer; |
||
37 | |||
38 | /** |
||
39 | * FileReader constructor. |
||
40 | * |
||
41 | * @param FileNodeInterface $file |
||
42 | * @param FormatInterface|null $format |
||
43 | * @param FormatterFactoryInterface $formatterFactory |
||
|
|||
44 | */ |
||
45 | 7 | public function __construct( |
|
76 | |||
77 | /** |
||
78 | * Adds multiple items to the file |
||
79 | * |
||
80 | * @param Traversable|array $rows a multidimensional array or a Traversable object |
||
81 | * |
||
82 | * @throws InvalidArgumentException If the given rows format is invalid |
||
83 | * |
||
84 | * @return static |
||
85 | */ |
||
86 | 1 | public function insertAll($rows) |
|
91 | |||
92 | /** |
||
93 | * Adds a single item |
||
94 | * |
||
95 | * @param mixed $row an item to insert |
||
96 | * |
||
97 | * @return static |
||
98 | */ |
||
99 | 1 | public function insertOne($row) |
|
104 | } |
||
105 |
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.