| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 69 | public function run() |
||
| 70 | { |
||
| 71 | $statement = $this->__invoke(); |
||
| 72 | $statement->setFetchMode(PDO::FETCH_ASSOC); |
||
| 73 | |||
| 74 | if ($this->one) { |
||
| 75 | $data = $statement->fetch(); |
||
| 76 | |||
| 77 | return $data ? $this->table->create($this->formatRow($data)) : null; |
||
| 78 | } |
||
| 79 | |||
| 80 | $data = array_map(Closure::fromCallable([$this, 'formatRow']), $statement->fetchAll()); |
||
| 81 | |||
| 82 | return $this->table->createCollection($data); |
||
| 83 | } |
||
| 84 | |||
| 94 |
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: