| Total Complexity | 11 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class MergeWithKeysAsReverseMerge implements BeforeMergeModifierInterface, AfterMergeModifierInterface |
||
| 12 | { |
||
| 13 | private array $array = []; |
||
| 14 | |||
| 15 | public function beforeMerge(array $arrays, int $index): array |
||
| 16 | { |
||
| 17 | $this->array = $arrays[$index]; |
||
| 18 | return $this->array; |
||
| 19 | } |
||
| 20 | |||
| 21 | public function afterMerge(array $data): array |
||
| 22 | { |
||
| 23 | return $this->applyOrder($data, $this->array); |
||
| 24 | } |
||
| 25 | |||
| 26 | private function applyOrder(array $data, array $array): array |
||
| 51 | } |
||
| 52 | } |
||
| 53 |