@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function getApplication() |
100 | 100 | { |
101 | - if (! $this->application instanceof Container) { |
|
101 | + if (!$this->application instanceof Container) { |
|
102 | 102 | $this->application = Container::getInstance(); |
103 | 103 | } |
104 | 104 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function getKernel() |
112 | 112 | { |
113 | - if (! $this->kernel instanceof Kernel) { |
|
113 | + if (!$this->kernel instanceof Kernel) { |
|
114 | 114 | $this->kernel = $this->getApplication()->make(Kernel::class); |
115 | 115 | } |
116 | 116 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | { |
231 | 231 | $framework = strtolower($framework); |
232 | 232 | |
233 | - if (! in_array($framework, ['laravel', 'lumen'])) { |
|
233 | + if (!in_array($framework, ['laravel', 'lumen'])) { |
|
234 | 234 | throw new \Exception(sprintf('Not support framework "%s".', $this->framework)); |
235 | 235 | } |
236 | 236 | |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | { |
312 | 312 | $application = $this->application; |
313 | 313 | |
314 | - $closure = function () use ($application) { |
|
314 | + $closure = function() use ($application) { |
|
315 | 315 | $this->app = $application; |
316 | 316 | }; |
317 | 317 |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | if (method_exists($this, $listener)) { |
170 | 170 | $this->server->on($event, [$this, $listener]); |
171 | 171 | } else { |
172 | - $this->server->on($event, function () use ($event) { |
|
172 | + $this->server->on($event, function() use ($event) { |
|
173 | 173 | $event = sprintf('swoole.%s', $event); |
174 | 174 | |
175 | 175 | $this->container['events']->fire($event, func_get_args()); |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | $publicPath = $this->container['config']->get('swoole_http.server.public_path', base_path('public')); |
292 | 292 | $filename = $publicPath . $uri; |
293 | 293 | |
294 | - if (! is_file($filename) || filesize($filename) === 0) { |
|
294 | + if (!is_file($filename) || filesize($filename) === 0) { |
|
295 | 295 | return; |
296 | 296 | } |
297 | 297 | |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | */ |
374 | 374 | protected function getApplication() |
375 | 375 | { |
376 | - if (! $this->application instanceof Application) { |
|
376 | + if (!$this->application instanceof Application) { |
|
377 | 377 | $this->createApplication(); |
378 | 378 | } |
379 | 379 | |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | */ |
416 | 416 | protected function bindSwooleServer() |
417 | 417 | { |
418 | - $this->app->singleton('swoole.server', function () { |
|
418 | + $this->app->singleton('swoole.server', function() { |
|
419 | 419 | return $this->server; |
420 | 420 | }); |
421 | 421 | } |
@@ -14,12 +14,12 @@ |
||
14 | 14 | */ |
15 | 15 | protected $swoole; |
16 | 16 | |
17 | - /** |
|
18 | - * Create a new Swoole Async task connector instance. |
|
19 | - * |
|
20 | - * @param \Swoole\Http\Server $swoole |
|
21 | - * @return void |
|
22 | - */ |
|
17 | + /** |
|
18 | + * Create a new Swoole Async task connector instance. |
|
19 | + * |
|
20 | + * @param \Swoole\Http\Server $swoole |
|
21 | + * @return void |
|
22 | + */ |
|
23 | 23 | public function __construct($swoole) |
24 | 24 | { |
25 | 25 | $this->swoole = $swoole; |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | }); |
68 | 68 | } |
69 | 69 | |
70 | - /** |
|
71 | - * Create a payload for an object-based queue handler. |
|
72 | - * |
|
73 | - * @param mixed $job |
|
74 | - * @return array |
|
75 | - */ |
|
70 | + /** |
|
71 | + * Create a payload for an object-based queue handler. |
|
72 | + * |
|
73 | + * @param mixed $job |
|
74 | + * @return array |
|
75 | + */ |
|
76 | 76 | protected function createObjectPayload($job) |
77 | 77 | { |
78 | 78 | return [ |
@@ -87,14 +87,14 @@ discard block |
||
87 | 87 | ]; |
88 | 88 | } |
89 | 89 | |
90 | - /** |
|
91 | - * Create a typical, string based queue payload array. |
|
92 | - * |
|
93 | - * @param string $job |
|
94 | - * @param mixed $data |
|
95 | - * |
|
96 | - * @throws Expcetion |
|
97 | - */ |
|
90 | + /** |
|
91 | + * Create a typical, string based queue payload array. |
|
92 | + * |
|
93 | + * @param string $job |
|
94 | + * @param mixed $data |
|
95 | + * |
|
96 | + * @throws Expcetion |
|
97 | + */ |
|
98 | 98 | protected function createStringPayload($job, $data) |
99 | 99 | { |
100 | 100 | throw new Exception("Unsupported empty data"); |
@@ -62,7 +62,7 @@ |
||
62 | 62 | */ |
63 | 63 | public function later($delay, $job, $data = '', $queue = null) |
64 | 64 | { |
65 | - return swoole_timer_after($this->secondsUntil($delay), function () use ($job, $data, $queue) { |
|
65 | + return swoole_timer_after($this->secondsUntil($delay), function() use ($job, $data, $queue) { |
|
66 | 66 | return $this->push($job, $data, $queue); |
67 | 67 | }); |
68 | 68 | } |