Completed
Branch master (087b38)
by Brian
03:20
created
Category
src/wormling/phparia/Api/Channels.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -367,7 +367,7 @@
 block discarded – undo
367 367
      */
368 368
     public function unmute($channelId, $direction)
369 369
     {
370
-        $uri = "/channels/$channelId/mute?direction=".$this->client->getEndpoint()->jsonEncode($direction);
370
+        $uri = "/channels/$channelId/mute?direction=" . $this->client->getEndpoint()->jsonEncode($direction);
371 371
         try {
372 372
             $this->client->getEndpoint()->delete($uri);
373 373
         } catch (Pest_NotFound $e) {
Please login to merge, or discard this patch.
src/wormling/phparia/Api/PlaybackList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         parent::offsetSet($offset, $value);
46 46
 
47 47
         // Remove playbacks when they are done playing
48
-        $value->oncePlaybackFinished(function () use ($offset) {
48
+        $value->oncePlaybackFinished(function() use ($offset) {
49 49
             $this->offsetUnset($offset);
50 50
         });
51 51
     }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         parent::append($value);
62 62
 
63 63
         // Remove playbacks when they are done playing
64
-        $value->oncePlaybackFinished(function () use ($value) {
64
+        $value->oncePlaybackFinished(function() use ($value) {
65 65
             $key = array_search($value, $this->getArrayCopy());
66 66
             if ($key !== false) {
67 67
                 $this->offsetUnset($key);
Please login to merge, or discard this patch.
src/wormling/phparia/Client/AmiClient.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,18 +76,18 @@
 block discarded – undo
76 76
         $factory = new Factory($this->eventLoop);
77 77
 
78 78
         return $factory->createClient($address)
79
-            ->then(function (Client $client) {
79
+            ->then(function(Client $client) {
80 80
                 $this->amiClient = $client;
81 81
                 $this->actionSender = new ActionSender($client);
82 82
                 $this->actionSender->events(true);
83
-                $client->on('close', function () {
83
+                $client->on('close', function() {
84 84
                     $this->logger->debug('AMI connection closed');
85 85
                 });
86
-                $client->on('event', function (Event $event) {
86
+                $client->on('event', function(Event $event) {
87 87
                     $this->wsClient->emit($event->getName(), (array)$event);
88 88
                 });
89
-            }, function (\Exception $e) {
90
-                $this->logger->err('Connection error: '.$e->getMessage());
89
+            }, function(\Exception $e) {
90
+                $this->logger->err('Connection error: ' . $e->getMessage());
91 91
             });
92 92
     }
93 93
 
Please login to merge, or discard this patch.
src/wormling/phparia/Client/AriClient.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -148,15 +148,15 @@
 block discarded – undo
148 148
         $apiKey = $queryParts['api_key'];
149 149
         list($username, $password) = explode(':', $apiKey);
150 150
 
151
-        $this->endpoint = new PestJSON('http://'.$host.':'.$port.dirname($path));
151
+        $this->endpoint = new PestJSON('http://' . $host . ':' . $port . dirname($path));
152 152
         $this->endpoint->setupAuth($username, $password, 'basic');
153 153
 
154 154
         $this->wsClient = new WebSocket($address, $this->eventLoop, $this->logger);
155 155
 
156
-        $this->wsClient->on("message", function (WebSocketMessage $rawMessage) {
156
+        $this->wsClient->on("message", function(WebSocketMessage $rawMessage) {
157 157
             $message = new Message($rawMessage->getData());
158 158
 
159
-            $eventType = '\\phparia\\Events\\'.$message->getType();
159
+            $eventType = '\\phparia\\Events\\' . $message->getType();
160 160
             if (class_exists($eventType)) {
161 161
                 $event = new $eventType($this, $rawMessage->getData());
162 162
             } else {
Please login to merge, or discard this patch.
src/wormling/phparia/Resources/Bridge.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public function onBridgeCreated(callable $callback)
132 132
     {
133
-        $this->on(Event::BRIDGE_CREATED.'_'.$this->getId(), $callback);
133
+        $this->on(Event::BRIDGE_CREATED . '_' . $this->getId(), $callback);
134 134
     }
135 135
 
136 136
     /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public function onceBridgeCreated(callable $callback)
140 140
     {
141
-        $this->once(Event::BRIDGE_CREATED.'_'.$this->getId(), $callback);
141
+        $this->once(Event::BRIDGE_CREATED . '_' . $this->getId(), $callback);
142 142
     }
143 143
 
144 144
     /**
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     public function onBridgeDestroyed(callable $callback)
148 148
     {
149
-        $this->on(Event::BRIDGE_DESTROYED.'_'.$this->getId(), $callback);
149
+        $this->on(Event::BRIDGE_DESTROYED . '_' . $this->getId(), $callback);
150 150
     }
151 151
 
152 152
     /**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     public function onceBridgeDestroyed(callable $callback)
156 156
     {
157
-        $this->once(Event::BRIDGE_DESTROYED.'_'.$this->getId(), $callback);
157
+        $this->once(Event::BRIDGE_DESTROYED . '_' . $this->getId(), $callback);
158 158
     }
159 159
 
160 160
     /**
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      */
163 163
     public function onBridgeMerged(callable $callback)
164 164
     {
165
-        $this->on(Event::BRIDGE_MERGED.'_'.$this->getId(), $callback);
165
+        $this->on(Event::BRIDGE_MERGED . '_' . $this->getId(), $callback);
166 166
     }
167 167
 
168 168
     /**
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function onceBridgeMerged(callable $callback)
172 172
     {
173
-        $this->once(Event::BRIDGE_MERGED.'_'.$this->getId(), $callback);
173
+        $this->once(Event::BRIDGE_MERGED . '_' . $this->getId(), $callback);
174 174
     }
175 175
 
176 176
     /**
Please login to merge, or discard this patch.
src/wormling/phparia/Resources/Resource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
      */
63 63
     public function once($event, callable $listener)
64 64
     {
65
-        $onceListener = function () use (&$onceListener, $event, $listener) {
65
+        $onceListener = function() use (&$onceListener, $event, $listener) {
66 66
             $this->removeListener($event, $onceListener);
67 67
 
68 68
             call_user_func_array($listener, func_get_args());
Please login to merge, or discard this patch.