@@ -282,7 +282,7 @@ |
||
282 | 282 | if (is_string($callback)) { |
283 | 283 | list($class, $method) = explode('&', $callback); |
284 | 284 | |
285 | - $callback = function (ConnectionOpenEvent $event) use ($class, $method) { |
|
285 | + $callback = function(ConnectionOpenEvent $event) use ($class, $method) { |
|
286 | 286 | return $class::{$method}($event); |
287 | 287 | }; |
288 | 288 | } |
@@ -83,7 +83,7 @@ |
||
83 | 83 | if (!empty($this->before)) { |
84 | 84 | $parts[] = (string) $this->before; |
85 | 85 | } |
86 | - $parts[] = 'cd ' . base_path(); |
|
86 | + $parts[] = 'cd '.base_path(); |
|
87 | 87 | $parts[] = "{$this->phpBinary} {$this->getArtisan()} {$this->command}"; |
88 | 88 | if (!empty($this->after)) { |
89 | 89 | $parts[] = (string) $this->after; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | $this->app->singleton('wamp.run', '\sonrac\WAMP\Commands\RunServer'); |
51 | 51 | |
52 | - $this->app->singleton('wampClient', function () use ($config) { |
|
52 | + $this->app->singleton('wampClient', function() use ($config) { |
|
53 | 53 | return new Client($config['realm']); |
54 | 54 | }); |
55 | 55 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $this->app->alias($abstract[0], $alias); |
75 | 75 | } |
76 | 76 | |
77 | - $this->app->singleton('sonrac\WAMP\Contracts\ClientTransportServiceProvider', function () use ($config) { |
|
77 | + $this->app->singleton('sonrac\WAMP\Contracts\ClientTransportServiceProvider', function() use ($config) { |
|
78 | 78 | return new RawSocketClientTransportProvider($config['host'], $config['port']); |
79 | 79 | }); |
80 | 80 |
@@ -201,7 +201,7 @@ |
||
201 | 201 | $callback = explode('&', $callback); |
202 | 202 | $self = $this; |
203 | 203 | |
204 | - return function (ClientSession $clientSession) use ($callback, $namespace, $self) { |
|
204 | + return function(ClientSession $clientSession) use ($callback, $namespace, $self) { |
|
205 | 205 | if (count($callback) === 1) { |
206 | 206 | return $this->{$callback[0]}($clientSession, $self->getClient()); |
207 | 207 | } |
@@ -68,11 +68,11 @@ |
||
68 | 68 | $pid = (int) trim($pid); |
69 | 69 | |
70 | 70 | if ($pid > 0) { |
71 | - exec('kill ' . $pid); |
|
71 | + exec('kill '.$pid); |
|
72 | 72 | } |
73 | 73 | } |
74 | 74 | |
75 | - exec('rm ' . $file); |
|
75 | + exec('rm '.$file); |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | return; |
148 | 148 | } |
149 | 149 | |
150 | - $path = $this->getConfig('pathLogFile') ?? storage_path('logs/' . $fileName); |
|
150 | + $path = $this->getConfig('pathLogFile') ?? storage_path('logs/'.$fileName); |
|
151 | 151 | |
152 | 152 | $handler = (new StreamHandler($path, MonologLogger::DEBUG)) |
153 | 153 | ->setFormatter(new LineFormatter(null, null, true, true)); |
@@ -219,6 +219,6 @@ discard block |
||
219 | 219 | |
220 | 220 | $content = file_get_contents($fileName); |
221 | 221 | |
222 | - file_put_contents($fileName, $content . PHP_EOL . $pid); |
|
222 | + file_put_contents($fileName, $content.PHP_EOL.$pid); |
|
223 | 223 | } |
224 | 224 | } |
@@ -64,12 +64,12 @@ discard block |
||
64 | 64 | $client->setRoutePath($this->routePath); |
65 | 65 | $client->start(); |
66 | 66 | } else { |
67 | - $command = ' --port=' . $this->port . |
|
68 | - ' --host=' . $this->host . |
|
69 | - ' --realm=' . $this->realm; |
|
67 | + $command = ' --port='.$this->port. |
|
68 | + ' --host='.$this->host. |
|
69 | + ' --realm='.$this->realm; |
|
70 | 70 | |
71 | 71 | if ($this->transportProvider) { |
72 | - $command .= ' --transport-provider=' . $this->transportProvider; |
|
72 | + $command .= ' --transport-provider='.$this->transportProvider; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | if ($this->noDebug) { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | if ($this->routePath) { |
84 | - $command .= ' --route-path=' . $this->routePath; |
|
84 | + $command .= ' --route-path='.$this->routePath; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | if ($this->noLoop) { |
@@ -142,6 +142,6 @@ discard block |
||
142 | 142 | */ |
143 | 143 | protected function getTransportURI() |
144 | 144 | { |
145 | - return ($this->tls ? 'wss://' : 'ws://') . $this->host . ':' . $this->port; |
|
145 | + return ($this->tls ? 'wss://' : 'ws://').$this->host.':'.$this->port; |
|
146 | 146 | } |
147 | 147 | } |
@@ -79,10 +79,10 @@ discard block |
||
79 | 79 | $this->parseOptions(); |
80 | 80 | $this->changeWampLogger(); |
81 | 81 | |
82 | - $clientCommand = 'php artisan wamp:register-routes' . $this->getCommandLineOptions(); |
|
82 | + $clientCommand = 'php artisan wamp:register-routes'.$this->getCommandLineOptions(); |
|
83 | 83 | |
84 | 84 | if ($this->clientTransportProvider) { |
85 | - $clientCommand .= ' --transport-provider=' . $this->clientTransportProvider; |
|
85 | + $clientCommand .= ' --transport-provider='.$this->clientTransportProvider; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | RunCommandInBackground::factory($clientCommand)->runInBackground(); |
@@ -92,10 +92,10 @@ discard block |
||
92 | 92 | $this->WAMPServer->registerModule($this->getTransportProvider()); |
93 | 93 | $this->WAMPServer->start(!$this->runOnce); |
94 | 94 | } else { |
95 | - $serverCommand = 'php artisan wamp:run-server ' . $this->getCommandLineOptions(); |
|
95 | + $serverCommand = 'php artisan wamp:run-server '.$this->getCommandLineOptions(); |
|
96 | 96 | |
97 | 97 | if ($this->clientTransportProvider) { |
98 | - $serverCommand .= ' --client-transport-provider=' . $this->clientTransportProvider; |
|
98 | + $serverCommand .= ' --client-transport-provider='.$this->clientTransportProvider; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | $this->addPidToLog(RunCommandInBackground::factory($serverCommand)->runInBackground(), 'servers.pids'); |
@@ -111,12 +111,12 @@ discard block |
||
111 | 111 | */ |
112 | 112 | protected function getCommandLineOptions() |
113 | 113 | { |
114 | - $command = ' --port=' . $this->port . |
|
115 | - ' --host=' . $this->host . |
|
116 | - ' --realm=' . $this->realm; |
|
114 | + $command = ' --port='.$this->port. |
|
115 | + ' --host='.$this->host. |
|
116 | + ' --realm='.$this->realm; |
|
117 | 117 | |
118 | 118 | if ($this->clientTransportProvider) { |
119 | - $command .= ' --transport-provider=' . $this->clientTransportProvider; |
|
119 | + $command .= ' --transport-provider='.$this->clientTransportProvider; |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | if ($this->noDebug) { |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | } |
129 | 129 | |
130 | 130 | if ($this->routePath) { |
131 | - $command .= ' --route-path=' . $this->routePath; |
|
131 | + $command .= ' --route-path='.$this->routePath; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | if ($this->noLoop) { |