1 | <?php |
||
9 | class Writer implements Contract |
||
10 | { |
||
11 | /** |
||
12 | * Holds a instance of config. |
||
13 | * |
||
14 | * @var Config |
||
15 | */ |
||
16 | private $config; |
||
17 | |||
18 | /** |
||
19 | * Holds a instance of StyleInterface. |
||
20 | * |
||
21 | * @var StyleInterface |
||
22 | */ |
||
23 | private $io; |
||
24 | |||
25 | /** |
||
26 | * Holds the rows. |
||
27 | * |
||
28 | * @var Config |
||
29 | */ |
||
30 | private $rows; |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | public function __construct(Config $config, StyleInterface $io) |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function write() |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | public function setRows(array $rows) |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function getRows() |
||
69 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: