@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | 'receiver' => $order->getClient() ? $order->getClient()->getName() : null, |
155 | 155 | 'subject' => 'Create logistic order', |
156 | 156 | 'notifier' => [ |
157 | - 'send' => function () use ($order) { |
|
157 | + 'send' => function() use ($order) { |
|
158 | 158 | try { |
159 | 159 | return true; |
160 | 160 | } catch (\Exception $e) { |
@@ -163,9 +163,9 @@ discard block |
||
163 | 163 | }, |
164 | 164 | ], |
165 | 165 | 'events' => [ |
166 | - 'onError' => function () use ($order, $logistic) { |
|
166 | + 'onError' => function() use ($order, $logistic) { |
|
167 | 167 | }, |
168 | - 'onSuccess' => function () use ($order, $logistic) { |
|
168 | + 'onSuccess' => function() use ($order, $logistic) { |
|
169 | 169 | try { |
170 | 170 | |
171 | 171 | $logisticOrder = clone $order; |
@@ -72,8 +72,9 @@ discard block |
||
72 | 72 | $orderLimit = $input->getArgument('limit') ?: 100; |
73 | 73 | |
74 | 74 | $getOrders = 'get' . str_replace('_', '', ucwords(strtolower($targetName), '_')) . 'Orders'; |
75 | - if (method_exists($this, $getOrders) === false) |
|
76 | - throw new \Exception(sprintf('Notification target "%s" is not defined', $targetName)); |
|
75 | + if (method_exists($this, $getOrders) === false) { |
|
76 | + throw new \Exception(sprintf('Notification target "%s" is not defined', $targetName)); |
|
77 | + } |
|
77 | 78 | |
78 | 79 | $this->output->writeln([ |
79 | 80 | '', |
@@ -104,8 +105,9 @@ discard block |
||
104 | 105 | |
105 | 106 | $this->output->writeln(['']); |
106 | 107 | } |
107 | - } else |
|
108 | - $this->output->writeln(' There is no pending orders.'); |
|
108 | + } else { |
|
109 | + $this->output->writeln(' There is no pending orders.'); |
|
110 | + } |
|
109 | 111 | |
110 | 112 | $this->output->writeln([ |
111 | 113 | '', |
@@ -142,9 +144,9 @@ discard block |
||
142 | 144 | $OrderLogistic = $qry->getResult(); |
143 | 145 | |
144 | 146 | |
145 | - if (count($OrderLogistic) == 0) |
|
146 | - return null; |
|
147 | - else { |
|
147 | + if (count($OrderLogistic) == 0) { |
|
148 | + return null; |
|
149 | + } else { |
|
148 | 150 | foreach ($OrderLogistic as $logistic) { |
149 | 151 | $order = $logistic->getOrder(); |
150 | 152 | $orders[] = (object) [ |