Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
68 | public function run() |
||
69 | { |
||
70 | $statement = $this->__invoke(); |
||
71 | $statement->setFetchMode(PDO::FETCH_ASSOC); |
||
72 | |||
73 | if ($this->one) { |
||
74 | $data = $statement->fetch(); |
||
75 | |||
76 | return $data ? $this->table->create($data, true) : null; |
||
77 | } |
||
78 | |||
79 | return $this->table->createCollection($statement->fetchAll(), true); |
||
80 | } |
||
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: