@@ -38,7 +38,7 @@ |
||
| 38 | 38 | new LimitConcurrentRequestsMiddleware($config['max_concurrency']), |
| 39 | 39 | new RequestBodyBufferMiddleware($config['buffer_size']), |
| 40 | 40 | new RequestBodyParserMiddleware(), |
| 41 | - static function (ServerRequestInterface $request) use ($application) { |
|
| 41 | + static function(ServerRequestInterface $request) use ($application) { |
|
| 42 | 42 | return $application |
| 43 | 43 | ->handle($request) |
| 44 | 44 | ->then([ResolveGenerator::class, 'toResponse']); |
@@ -16,14 +16,14 @@ |
||
| 16 | 16 | * @param callable<Generator>|ResponseInterface|PromiseInterface $generator |
| 17 | 17 | */ |
| 18 | 18 | public static function toResponse( |
| 19 | - callable|ResponseInterface|PromiseInterface $callback |
|
| 20 | - ): PromiseInterface|ResponseInterface { |
|
| 19 | + callable | ResponseInterface | PromiseInterface $callback |
|
| 20 | + ): PromiseInterface | ResponseInterface { |
|
| 21 | 21 | if (false === is_callable($callback)) { |
| 22 | 22 | return $callback; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | return new Promise( |
| 26 | - static function (callable $resolve, callable $reject) use ($callback): void { |
|
| 26 | + static function(callable $resolve, callable $reject) use ($callback): void { |
|
| 27 | 27 | try { |
| 28 | 28 | /** @var Generator<PromiseInterface|ResponseInterface> $generator */ |
| 29 | 29 | $generator = $callback(); |
@@ -40,12 +40,12 @@ |
||
| 40 | 40 | string $rootPath, |
| 41 | 41 | ?FilesystemInterface $filesystem |
| 42 | 42 | ) { |
| 43 | - $container = require $rootPath . '/config/container.php'; |
|
| 43 | + $container = require $rootPath.'/config/container.php'; |
|
| 44 | 44 | assert($container instanceof ContainerInterface); |
| 45 | 45 | $application = $container->get(Application::class); |
| 46 | 46 | assert($application instanceof ReactApplication); |
| 47 | - (require $rootPath . '/router/middleware.php')($application, $container); |
|
| 48 | - (require $rootPath . '/router/routes.php')($application, $container); |
|
| 47 | + (require $rootPath.'/router/middleware.php')($application, $container); |
|
| 48 | + (require $rootPath.'/router/routes.php')($application, $container); |
|
| 49 | 49 | $this->container = $container; |
| 50 | 50 | $this->application = $application; |
| 51 | 51 | $this->serverContext = $serverContext; |
@@ -28,13 +28,13 @@ |
||
| 28 | 28 | $adapter = $definition->getOption('adapter'); |
| 29 | 29 | $adapter->setDefault(DriftKernelAdapter::class); |
| 30 | 30 | $staticFolder = $definition->getOption('static-folder'); |
| 31 | - $staticFolder->setDefault((string)$config['static_folder']); |
|
| 31 | + $staticFolder->setDefault((string) $config['static_folder']); |
|
| 32 | 32 | $workers = $definition->getOption('workers'); |
| 33 | - $workers->setDefault((string)$config['workers']); |
|
| 33 | + $workers->setDefault((string) $config['workers']); |
|
| 34 | 34 | $concurrentRequests = $definition->getOption('concurrent-requests'); |
| 35 | - $concurrentRequests->setDefault((string)$config['max_concurrency']); |
|
| 35 | + $concurrentRequests->setDefault((string) $config['max_concurrency']); |
|
| 36 | 36 | $bufferSize = $definition->getOption('request-body-buffer'); |
| 37 | - $bufferSize->setDefault((string)$config['buffer_size']); |
|
| 37 | + $bufferSize->setDefault((string) $config['buffer_size']); |
|
| 38 | 38 | |
| 39 | 39 | return $command; |
| 40 | 40 | } |
@@ -31,11 +31,11 @@ |
||
| 31 | 31 | $definition->setArguments([$path]); |
| 32 | 32 | |
| 33 | 33 | $staticFolder = $definition->getOption('static-folder'); |
| 34 | - $staticFolder->setDefault((string)$config['static_folder']); |
|
| 34 | + $staticFolder->setDefault((string) $config['static_folder']); |
|
| 35 | 35 | $concurrentRequests = $definition->getOption('concurrent-requests'); |
| 36 | - $concurrentRequests->setDefault((string)$config['max_concurrency']); |
|
| 36 | + $concurrentRequests->setDefault((string) $config['max_concurrency']); |
|
| 37 | 37 | $bufferSize = $definition->getOption('request-body-buffer'); |
| 38 | - $bufferSize->setDefault((string)$config['buffer_size']); |
|
| 38 | + $bufferSize->setDefault((string) $config['buffer_size']); |
|
| 39 | 39 | |
| 40 | 40 | return $command; |
| 41 | 41 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public static function fromGeneratorCallback(callable $callback): self |
| 38 | 38 | { |
| 39 | - return new self(resolve(function () use ($callback): Generator { |
|
| 39 | + return new self(resolve(function() use ($callback): Generator { |
|
| 40 | 40 | /** @var Generator $generator */ |
| 41 | 41 | $generator = $callback(); |
| 42 | 42 | |