| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 2 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function __construct(PDOStatementHandle $statement) |
||
| 24 | { |
||
| 25 | // Since no more than one PDOStatement for any one connection can be safely |
||
| 26 | // traversed, each statement simply requests all rows at once for safety. |
||
| 27 | // This could be re-engineered to call fetchAll on an as-needed basis |
||
| 28 | |||
| 29 | $this->results = $statement->typeCorrectedFetchAll(); |
||
| 30 | $statement->closeCursor(); |
||
| 31 | } |
||
| 43 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: