@@ -8,7 +8,7 @@ |
||
8 | 8 | protected function selectChannels(Message $message) |
9 | 9 | { |
10 | 10 | $order = $message->getContent(); |
11 | - $channelName = $order['iced'] ? 'coldDrinks' : 'hotDrinks'; |
|
11 | + $channelName = $order['iced'] ? 'coldDrinks' : 'hotDrinks'; |
|
12 | 12 | echo PEIP_LINE_SEPARATOR."DrinkRouter: routed to channel: $channelName"; |
13 | 13 | |
14 | 14 | return $channelName; |
@@ -10,12 +10,12 @@ discard block |
||
10 | 10 | |
11 | 11 | public function setHotDrinkDelay($hotDrinkDelay) |
12 | 12 | { |
13 | - $this->hotDrinkDelay = (int) $hotDrinkDelay; |
|
13 | + $this->hotDrinkDelay = (int)$hotDrinkDelay; |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | public function setColdDrinkDelay($coldDrinkDelay) |
17 | 17 | { |
18 | - $this->coldDrinkDelay = (int) $coldDrinkDelay; |
|
18 | + $this->coldDrinkDelay = (int)$coldDrinkDelay; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public function prepareHotDrink(array $orderItem) |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | if ($cold) { |
49 | 49 | $type = 'cold'; |
50 | 50 | $count = $this->coldDrinkCounter; |
51 | - } else { |
|
51 | + }else { |
|
52 | 52 | $type = 'hot'; |
53 | 53 | $count = $this->hotDrinkCounter; |
54 | 54 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | { |
37 | 37 | $x = 0; |
38 | 38 | foreach ($this->items as $item) { |
39 | - $x += (int) $item['number']; |
|
39 | + $x += (int)$item['number']; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | return $x; |
@@ -54,6 +54,6 @@ |
||
54 | 54 | // receive drinks |
55 | 55 | $drinks = $cafe->receiveDelivery(); |
56 | 56 | } |
57 | -} else { |
|
57 | +}else { |
|
58 | 58 | throw new RuntimeException('Could not get CafeGateway'); |
59 | 59 | } |