| Conditions | 6 |
| Paths | 7 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 6.0359 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | 4 | protected function getRows(): array |
|
| 29 | { |
||
| 30 | 4 | $rows = []; |
|
| 31 | 4 | $count = 0; |
|
| 32 | |||
| 33 | try { |
||
| 34 | do { |
||
| 35 | 4 | $this->dataReader?->next(); |
|
| 36 | /** @psalm-var array|bool $row */ |
||
| 37 | 4 | $row = $this->dataReader?->current(); |
|
| 38 | 4 | } while ($row && ($rows[] = $row) && ++$count < $this->batchSize); |
|
| 39 | 4 | } catch (PDOException $e) { |
|
| 40 | 4 | if (!in_array($this->mssqlNoMoreRowsErrorCode, (array) $e->errorInfo, true)) { |
|
| 41 | throw $e; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | 4 | return $rows; |
|
| 46 | } |
||
| 48 |