@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | foreach ($this->clients as $client) { |
40 | 40 | if ($from == $client) { |
41 | 41 | $type = strtolower(substr($msg, 0, strpos($msg, '|'))); |
42 | - $data = substr($msg, strpos($msg,'|') + 1); |
|
43 | - switch($type) { |
|
42 | + $data = substr($msg, strpos($msg, '|') + 1); |
|
43 | + switch ($type) { |
|
44 | 44 | case 'cart' : $result = getCartData($data); |
45 | 45 | break; |
46 | 46 | case 'prod' : $result = getProductData($data); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | case default: break; |
51 | 51 | |
52 | 52 | } |
53 | - if(!empty($result)) { |
|
53 | + if (!empty($result)) { |
|
54 | 54 | $client->send(json_encode($result)); |
55 | 55 | } |
56 | 56 | } |