@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $this->socket = $socket; |
34 | 34 | $this->component = $component === null ? new NullServer() : $component; |
35 | 35 | |
36 | - $socket->on('connect', [ $this, 'handleConnect' ]); |
|
36 | + $socket->on('connect', [$this, 'handleConnect']); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | { |
96 | 96 | $this->component->handleConnect($socket->conn); |
97 | 97 | |
98 | - $socket->on('data', [ $this, 'handleData' ]); |
|
99 | - $socket->on('error', [ $this, 'handleError' ]); |
|
100 | - $socket->on('close', [ $this, 'handleDisconnect' ]); |
|
98 | + $socket->on('data', [$this, 'handleData']); |
|
99 | + $socket->on('error', [$this, 'handleError']); |
|
100 | + $socket->on('close', [$this, 'handleDisconnect']); |
|
101 | 101 | } |
102 | 102 | catch (Error $ex) |
103 | 103 | { |
@@ -153,8 +153,8 @@ |
||
153 | 153 | $path, |
154 | 154 | new Route( |
155 | 155 | $path, |
156 | - [ '_controller' => $component ], |
|
157 | - $this->checkOrigin ? [ 'Origin' => $this->host ] : [], |
|
156 | + ['_controller' => $component], |
|
157 | + $this->checkOrigin ? ['Origin' => $this->host] : [], |
|
158 | 158 | [], |
159 | 159 | $this->checkOrigin ? $this->host : '' |
160 | 160 | ) |
@@ -79,7 +79,7 @@ |
||
79 | 79 | { |
80 | 80 | return preg_replace_callback( |
81 | 81 | '/(?:[^A-Za-z0-9_\-\.~!\$&\'\(\)\[\]\*\+,:;=\/% ]+|%(?![A-Fa-f0-9]{2}))/', |
82 | - function (array $matches) { |
|
82 | + function(array $matches) { |
|
83 | 83 | return rawurlencode($matches[0]); |
84 | 84 | }, |
85 | 85 | $header |
@@ -82,7 +82,7 @@ |
||
82 | 82 | */ |
83 | 83 | public function send($data) |
84 | 84 | { |
85 | - $this->conn->write((string)$data); |
|
85 | + $this->conn->write((string) $data); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
@@ -79,7 +79,7 @@ |
||
79 | 79 | { |
80 | 80 | return preg_replace_callback( |
81 | 81 | '/(?:[^A-Za-z0-9_\-\.~!\$&\'\(\)\[\]\*\+,:;=\/% ]+|%(?![A-Fa-f0-9]{2}))/', |
82 | - function (array $matches) { |
|
82 | + function(array $matches) { |
|
83 | 83 | return rawurlencode($matches[0]); |
84 | 84 | }, |
85 | 85 | $header |