Completed
Pull Request — master (#92)
by Maxime
02:05
created
src/Server/Websocket.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
 
103 103
     public function setMessageHandler($messageHandler)
104 104
     {
105
-        if (!$messageHandler instanceof MessageHandlerInterface &&  !is_string($messageHandler)) {
105
+        if (!$messageHandler instanceof MessageHandlerInterface && !is_string($messageHandler)) {
106 106
             throw new \InvalidArgumentException('The message handler must be an instance of MessageHandlerInterface or a string.');
107 107
         }
108 108
         if (is_string($messageHandler)) {
109 109
             try {
110 110
                 $reflection = new \ReflectionClass($messageHandler);
111
-                if(!$reflection->implementsInterface('Nekland\Woketo\Message\MessageHandlerInterface')) {
111
+                if (!$reflection->implementsInterface('Nekland\Woketo\Message\MessageHandlerInterface')) {
112 112
                     throw new \InvalidArgumentException('The messageHandler must implement MessageHandlerInterface');
113 113
                 }
114 114
             } catch (\ReflectionException $e) {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $this->loop = \React\EventLoop\Factory::create();
125 125
 
126 126
         $socket = new \React\Socket\Server($this->loop);
127
-        $socket->on('connection', function ($socketStream) {
127
+        $socket->on('connection', function($socketStream) {
128 128
             $this->onNewConnection($socketStream);
129 129
         });
130 130
         $socket->listen($this->port);
Please login to merge, or discard this patch.
src/Rfc6455/Frame.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * on the root directory of this project
9 9
  */
10 10
 
11
-declare(strict_types=1);
11
+declare(strict_types = 1);
12 12
 namespace Nekland\Woketo\Rfc6455;
13 13
 
14 14
 use Nekland\Woketo\Exception\Frame\ControlFrameException;
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
  */
27 27
 class Frame
28 28
 {
29
-    const OP_CONTINUE =  0;
30
-    const OP_TEXT     =  1;
31
-    const OP_BINARY   =  2;
32
-    const OP_CLOSE    =  8;
33
-    const OP_PING     =  9;
29
+    const OP_CONTINUE = 0;
30
+    const OP_TEXT     = 1;
31
+    const OP_BINARY   = 2;
32
+    const OP_CLOSE    = 8;
33
+    const OP_PING     = 9;
34 34
     const OP_PONG     = 10;
35 35
 
36 36
     // To understand codes, please refer to RFC:
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
     {
587 587
         $this->config = array_merge([
588 588
             'maxPayloadSize' => Frame::$defaultMaxPayloadSize,
589
-        ],$config);
589
+        ], $config);
590 590
 
591 591
         return $this;
592 592
     }
Please login to merge, or discard this patch.