@@ -47,14 +47,17 @@ discard block |
||
47 | 47 | |
48 | 48 | public function printOrder(Order $order, ?array $devices = []) |
49 | 49 | { |
50 | - if (empty($devices)) |
|
51 | - $devices = $this->configService->getConfig($order->getProvider(), 'order-print-devices', true); |
|
50 | + if (empty($devices)) { |
|
51 | + $devices = $this->configService->getConfig($order->getProvider(), 'order-print-devices', true); |
|
52 | + } |
|
52 | 53 | |
53 | - if ($devices) |
|
54 | - $devices = $this->deviceService->findDevices($devices); |
|
54 | + if ($devices) { |
|
55 | + $devices = $this->deviceService->findDevices($devices); |
|
56 | + } |
|
55 | 57 | |
56 | - foreach ($devices as $device) |
|
57 | - $this->generatePrintData($order, $device); |
|
58 | + foreach ($devices as $device) { |
|
59 | + $this->generatePrintData($order, $device); |
|
60 | + } |
|
58 | 61 | } |
59 | 62 | |
60 | 63 | private function printProduct($orderProduct, $indent = "- ") |
@@ -100,8 +103,9 @@ discard block |
||
100 | 103 | $this->printProduct($parentOrderProduct); |
101 | 104 | |
102 | 105 | $childs = $parentOrderProduct->getOrderProductComponents(); |
103 | - if (!empty($childs)) |
|
104 | - $this->printChildren($childs); |
|
106 | + if (!empty($childs)) { |
|
107 | + $this->printChildren($childs); |
|
108 | + } |
|
105 | 109 | |
106 | 110 | $this->printService->addLine('', '', '-'); |
107 | 111 | } |