| 1 | <?php |
||
| 21 | class Writer implements Contract |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * Holds a instance of config. |
||
| 25 | * |
||
| 26 | * @var Config |
||
| 27 | */ |
||
| 28 | private $config; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Holds a instance of StyleInterface. |
||
| 32 | * |
||
| 33 | * @var StyleInterface |
||
| 34 | */ |
||
| 35 | private $io; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Holds the rows. |
||
| 39 | * |
||
| 40 | * @var Config |
||
| 41 | */ |
||
| 42 | private $rows; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * {@inheritdoc} |
||
| 46 | */ |
||
| 47 | public function __construct(Config $config, StyleInterface $io) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * {@inheritdoc} |
||
| 55 | */ |
||
| 56 | public function write() |
||
| 63 | |||
| 64 | /** |
||
| 65 | * {@inheritdoc} |
||
| 66 | */ |
||
| 67 | public function setRows(array $rows) |
||
| 73 | |||
| 74 | /** |
||
| 75 | * {@inheritdoc} |
||
| 76 | */ |
||
| 77 | public function getRows() |
||
| 81 | } |
||
| 82 |
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: