@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | declare(strict_types=1); |
| 12 | 12 | |
| 13 | -require __DIR__ . '/vendor/autoload.php'; |
|
| 13 | +require __DIR__.'/vendor/autoload.php'; |
|
| 14 | 14 | |
| 15 | 15 | use Symfony\Component\Config\FileLocator; |
| 16 | 16 | use Symfony\Component\Console\Application; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | $container = new ContainerBuilder(); |
| 21 | 21 | |
| 22 | -$loader = new PhpFileLoader($container, new FileLocator(__DIR__ . '/config')); |
|
| 22 | +$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/config')); |
|
| 23 | 23 | $loader->load('services.php'); |
| 24 | 24 | |
| 25 | 25 | $application = new Application(); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public function log($level, $message, array $context = array()) |
| 29 | 29 | { |
| 30 | - $message = '[{now}] ' . $message; |
|
| 30 | + $message = '[{now}] '.$message; |
|
| 31 | 31 | $context['now'] = new DateTime(); |
| 32 | 32 | $this->logger->log($level, $message, $context); |
| 33 | 33 | } |
@@ -139,7 +139,7 @@ |
||
| 139 | 139 | public function onWorkerStart(Server $server, int $workerId): void |
| 140 | 140 | { |
| 141 | 141 | global $argv; |
| 142 | - swoole_set_process_name('php ' . $argv[0] . ': ' . ($server->taskworker ? 'task_worker' : 'worker')); |
|
| 142 | + swoole_set_process_name('php '.$argv[0].': '.($server->taskworker ? 'task_worker' : 'worker')); |
|
| 143 | 143 | $this->_logger->info( |
| 144 | 144 | '{worker}(id:{id}) started.', |
| 145 | 145 | [ |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | ] |
| 64 | 64 | ); |
| 65 | 65 | if ($port === false) { |
| 66 | - throw new InvalidArgumentException('Invalid port: ' . $this['port'] . '.', 1001); |
|
| 66 | + throw new InvalidArgumentException('Invalid port: '.$this['port'].'.', 1001); |
|
| 67 | 67 | } |
| 68 | 68 | $this['port'] = $port; |
| 69 | 69 | } |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | } |
| 131 | 131 | return $result; |
| 132 | 132 | } elseif (strpos($expected, '*') !== false) { |
| 133 | - return preg_match('#^' . str_replace('*', '.*', $expected) . '$#', $actual) > 0; |
|
| 133 | + return preg_match('#^'.str_replace('*', '.*', $expected).'$#', $actual) > 0; |
|
| 134 | 134 | } else { |
| 135 | 135 | return $actual == $expected; |
| 136 | 136 | } |