merge poza pętlą

    public function xxx(OrderInterface $order, ?string $postCodeToCheck): void
    {
        $returnOfDamagedEquipmentServicesToRemoveLocal = [];

        foreach ($this->guardsCollection as $singleGuard) {
                $returnOfDamagedEquipmentServicesToRemoveLocal[] = $singleGuard->getReturnOfDamagedEquipmentServicesToRemove();
            }
        }

        if (empty($returnOfDamagedEquipmentServicesToRemoveLocal)) {
            return;
        }

        $this->returnOfDamagedEquipmentServicesToRemove = array_merge(
            ...$returnOfDamagedEquipmentServicesToRemoveLocal
        );
    }
Komentarze wyłączone