@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | public function handle() |
| 26 | 26 | { |
| 27 | - $action = (string)$this->argument('action'); |
|
| 27 | + $action = (string) $this->argument('action'); |
|
| 28 | 28 | switch ($action) { |
| 29 | 29 | case 'publish': |
| 30 | 30 | $this->publish(); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | { |
| 57 | 57 | // Load configuration laravel.php manually for Lumen |
| 58 | 58 | $basePath = config('laravels.laravel_base_path') ?: base_path(); |
| 59 | - if ($this->isLumen() && file_exists($basePath . '/config/laravels.php')) { |
|
| 59 | + if ($this->isLumen() && file_exists($basePath.'/config/laravels.php')) { |
|
| 60 | 60 | $this->getLaravel()->configure('laravels'); |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $laravelSVersion, |
| 114 | 114 | ], |
| 115 | 115 | [ |
| 116 | - $this->getApplication()->getName() . ' [<info>' . env('APP_ENV', config('app.env')) . '</info>]', |
|
| 116 | + $this->getApplication()->getName().' [<info>'.env('APP_ENV', config('app.env')).'</info>]', |
|
| 117 | 117 | $this->getApplication()->getVersion(), |
| 118 | 118 | ], |
| 119 | 119 | ]); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | { |
| 124 | 124 | $this->comment('>>> Protocols'); |
| 125 | 125 | |
| 126 | - $config = unserialize((string)file_get_contents($this->getConfigPath())); |
|
| 126 | + $config = unserialize((string) file_get_contents($this->getConfigPath())); |
|
| 127 | 127 | $ssl = isset($config['server']['swoole']['ssl_key_file'], $config['server']['swoole']['ssl_cert_file']); |
| 128 | 128 | $socketType = isset($config['server']['socket_type']) ? $config['server']['socket_type'] : SWOOLE_SOCK_TCP; |
| 129 | 129 | if (in_array($socketType, [SWOOLE_SOCK_UNIX_DGRAM, SWOOLE_SOCK_UNIX_STREAM])) { |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | continue; |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - $name = 'Port#' . $key . ' '; |
|
| 166 | + $name = 'Port#'.$key.' '; |
|
| 167 | 167 | $name .= isset($socketTypeNames[$socket['type']]) ? $socketTypeNames[$socket['type']] : 'Unknown socket'; |
| 168 | 168 | $tableRows [] = [ |
| 169 | 169 | $name, |
@@ -196,8 +196,8 @@ discard block |
||
| 196 | 196 | $laravelConf = [ |
| 197 | 197 | 'root_path' => $svrConf['laravel_base_path'], |
| 198 | 198 | 'static_path' => $svrConf['swoole']['document_root'], |
| 199 | - 'cleaners' => array_unique((array)Arr::get($svrConf, 'cleaners', [])), |
|
| 200 | - 'register_providers' => array_unique((array)Arr::get($svrConf, 'register_providers', [])), |
|
| 199 | + 'cleaners' => array_unique((array) Arr::get($svrConf, 'cleaners', [])), |
|
| 200 | + 'register_providers' => array_unique((array) Arr::get($svrConf, 'register_providers', [])), |
|
| 201 | 201 | 'destroy_controllers' => Arr::get($svrConf, 'destroy_controllers', []), |
| 202 | 202 | 'is_lumen' => $this->isLumen(), |
| 203 | 203 | '_SERVER' => $_SERVER, |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | $svrConf['laravel_base_path'] = base_path(); |
| 223 | 223 | } |
| 224 | 224 | if (empty($svrConf['process_prefix'])) { |
| 225 | - $svrConf['process_prefix'] = trim(config('app.name', '') . ' ' . $svrConf['laravel_base_path']); |
|
| 225 | + $svrConf['process_prefix'] = trim(config('app.name', '').' '.$svrConf['laravel_base_path']); |
|
| 226 | 226 | } |
| 227 | 227 | if ($this->option('ignore')) { |
| 228 | 228 | $svrConf['ignore_check_pid'] = true; |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $svrConf['ignore_check_pid'] = false; |
| 231 | 231 | } |
| 232 | 232 | if (empty($svrConf['swoole']['document_root'])) { |
| 233 | - $svrConf['swoole']['document_root'] = $svrConf['laravel_base_path'] . '/public'; |
|
| 233 | + $svrConf['swoole']['document_root'] = $svrConf['laravel_base_path'].'/public'; |
|
| 234 | 234 | } |
| 235 | 235 | if ($this->option('daemonize')) { |
| 236 | 236 | $svrConf['swoole']['daemonize'] = true; |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | // Set X-Version |
| 258 | - $xVersion = (string)$this->option('x-version'); |
|
| 258 | + $xVersion = (string) $this->option('x-version'); |
|
| 259 | 259 | if ($xVersion !== '') { |
| 260 | 260 | $_SERVER['X_VERSION'] = $_ENV['X_VERSION'] = $xVersion; |
| 261 | 261 | } |
@@ -282,34 +282,34 @@ discard block |
||
| 282 | 282 | public function publish() |
| 283 | 283 | { |
| 284 | 284 | $basePath = config('laravels.laravel_base_path') ?: base_path(); |
| 285 | - $configPath = $basePath . '/config/laravels.php'; |
|
| 285 | + $configPath = $basePath.'/config/laravels.php'; |
|
| 286 | 286 | $todoList = [ |
| 287 | 287 | [ |
| 288 | - 'from' => realpath(__DIR__ . '/../../config/laravels.php'), |
|
| 288 | + 'from' => realpath(__DIR__.'/../../config/laravels.php'), |
|
| 289 | 289 | 'to' => $configPath, |
| 290 | 290 | 'mode' => 0644, |
| 291 | 291 | ], |
| 292 | 292 | [ |
| 293 | - 'from' => realpath(__DIR__ . '/../../bin/laravels'), |
|
| 294 | - 'to' => $basePath . '/bin/laravels', |
|
| 293 | + 'from' => realpath(__DIR__.'/../../bin/laravels'), |
|
| 294 | + 'to' => $basePath.'/bin/laravels', |
|
| 295 | 295 | 'mode' => 0755, |
| 296 | 296 | 'link' => true, |
| 297 | 297 | ], |
| 298 | 298 | [ |
| 299 | - 'from' => realpath(__DIR__ . '/../../bin/fswatch'), |
|
| 300 | - 'to' => $basePath . '/bin/fswatch', |
|
| 299 | + 'from' => realpath(__DIR__.'/../../bin/fswatch'), |
|
| 300 | + 'to' => $basePath.'/bin/fswatch', |
|
| 301 | 301 | 'mode' => 0755, |
| 302 | 302 | 'link' => true, |
| 303 | 303 | ], |
| 304 | 304 | [ |
| 305 | - 'from' => realpath(__DIR__ . '/../../bin/inotify'), |
|
| 306 | - 'to' => $basePath . '/bin/inotify', |
|
| 305 | + 'from' => realpath(__DIR__.'/../../bin/inotify'), |
|
| 306 | + 'to' => $basePath.'/bin/inotify', |
|
| 307 | 307 | 'mode' => 0755, |
| 308 | 308 | 'link' => true, |
| 309 | 309 | ], |
| 310 | 310 | ]; |
| 311 | 311 | if (file_exists($configPath)) { |
| 312 | - $choice = $this->anticipate($configPath . ' already exists, do you want to override it ? Y/N', |
|
| 312 | + $choice = $this->anticipate($configPath.' already exists, do you want to override it ? Y/N', |
|
| 313 | 313 | ['Y', 'N'], |
| 314 | 314 | 'N' |
| 315 | 315 | ); |