Conditions | 4 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
53 | protected function performOperation(string $command, array $data, array $queryOptions = []) : array |
||
54 | { |
||
55 | if ($this->isConsistent()) { |
||
56 | return $this->first->batchQuery($command, $data, $queryOptions); |
||
57 | } |
||
58 | |||
59 | foreach ($data as $key => $record) { |
||
60 | $records[$record['recordModel']->className()][$key] = $record; |
||
61 | } |
||
62 | |||
63 | $results = []; |
||
64 | foreach ($records as $className => $d) { |
||
|
|||
65 | $row = reset($d); |
||
66 | $model = $d['recordModel']; |
||
67 | $results = array_merge($results, $model->batchQuery($command, $d, $queryOptions)); |
||
68 | } |
||
69 | |||
70 | return $results; |
||
71 | } |
||
73 |