Completed
Push — master ( da46fb...91cc27 )
by Ankit
09:18
created
src/Chat.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -55,33 +55,28 @@  discard block
 block discarded – undo
55 55
                 );
56 56
             }
57 57
             $from->send(json_encode($initial));
58
-        }
59
-        elseif ($msg->type == 'Load Sidebar')
58
+        } elseif ($msg->type == 'Load Sidebar')
60 59
         {
61 60
             $sidebar = (object) array();
62 61
             $sidebar->sidebar = json_decode($this->onSidebar($from->userId));
63 62
             $from->send(json_encode($sidebar));
64
-        }
65
-        elseif ($msg->type == 'Initiated')
63
+        } elseif ($msg->type == 'Initiated')
66 64
         {
67 65
             $msg->userId = $from->userId;
68 66
             $result = (object) array();
69 67
             $result->conversation = json_decode($this->onConversation(json_encode($msg), False));
70 68
             $from->send(json_encode($result));
71
-        }
72
-        elseif ($msg->type == 'Search')
69
+        } elseif ($msg->type == 'Search')
73 70
         {
74 71
             $msg->userId = $from->userId;
75 72
             $searchResult = $this->onSearch($msg);
76 73
             $from->send($searchResult);
77
-        }
78
-        elseif ($msg->type == 'Compose')
74
+        } elseif ($msg->type == 'Compose')
79 75
         {
80 76
             $msg->userId = $from->userId;
81 77
             $composeResult = $this->onCompose($msg);
82 78
             $from->send($composeResult);
83
-        }
84
-        else
79
+        } else
85 80
         {
86 81
             $msg->userId = $from->userId;
87 82
             $getReturn = $this->onReply($msg);
@@ -106,8 +101,7 @@  discard block
 block discarded – undo
106 101
                     );
107 102
 
108 103
                     $client->send(json_encode($receiveResult));
109
-                }
110
-                elseif($client == $from)
104
+                } elseif($client == $from)
111 105
                 {
112 106
                     $sentResult->sidebar = json_decode($this->onSidebar($client->userId));
113 107
 
Please login to merge, or discard this patch.