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