@@ -5,9 +5,9 @@ |
||
| 5 | 5 | use Symfony\Component\ErrorHandler\Debug; |
| 6 | 6 | use Symfony\Component\HttpFoundation\Request; |
| 7 | 7 | |
| 8 | -require dirname(__DIR__).'/vendor/autoload.php'; |
|
| 8 | +require dirname(__DIR__) . '/vendor/autoload.php'; |
|
| 9 | 9 | |
| 10 | -(new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); |
|
| 10 | +(new Dotenv())->bootEnv(dirname(__DIR__) . '/.env'); |
|
| 11 | 11 | |
| 12 | 12 | if ($_SERVER['APP_DEBUG']) { |
| 13 | 13 | umask(0000); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | public static function factory(array $defaultOptions = []): Closure |
| 52 | 52 | { |
| 53 | - return static function (callable $handler) use ($defaultOptions): self { |
|
| 53 | + return static function(callable $handler) use ($defaultOptions): self { |
|
| 54 | 54 | return new self($handler, $defaultOptions); |
| 55 | 55 | }; |
| 56 | 56 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | private function onFulfilled(RequestInterface $request, array $options): callable |
| 81 | 81 | { |
| 82 | - return function (ResponseInterface $response) use ($request, $options) { |
|
| 82 | + return function(ResponseInterface $response) use ($request, $options) { |
|
| 83 | 83 | return $this->shouldRetryHttpResponse($options, $response) |
| 84 | 84 | ? $this->doRetry($request, $options, $response) |
| 85 | 85 | : $this->returnResponse($options, $response); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | private function onRejected(RequestInterface $request, array $options): callable |
| 90 | 90 | { |
| 91 | - return function ($reason) use ($request, $options): PromiseInterface { |
|
| 91 | + return function($reason) use ($request, $options): PromiseInterface { |
|
| 92 | 92 | if ($reason instanceof BadResponseException) { |
| 93 | 93 | if ($this->shouldRetryHttpResponse($options, $reason->getResponse())) { |
| 94 | 94 | return $this->doRetry($request, $options, $reason->getResponse()); |
@@ -21,12 +21,12 @@ |
||
| 21 | 21 | { |
| 22 | 22 | $logger = $this->logger; |
| 23 | 23 | |
| 24 | - return static function (callable $handler) use ($logger) { |
|
| 25 | - return static function (RequestInterface $request, array $options) use ($handler, $logger) { |
|
| 24 | + return static function(callable $handler) use ($logger) { |
|
| 25 | + return static function(RequestInterface $request, array $options) use ($handler, $logger) { |
|
| 26 | 26 | $promise = $handler($request, $options); |
| 27 | 27 | |
| 28 | 28 | return $promise->then( |
| 29 | - function (ResponseInterface $response) use ($request, $logger) { |
|
| 29 | + function(ResponseInterface $response) use ($request, $logger) { |
|
| 30 | 30 | $requestBody = $request->getBody(); |
| 31 | 31 | $logger->info($requestBody->getContents()); |
| 32 | 32 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | public function getItems(array $keys = []): array |
| 41 | 41 | { |
| 42 | - return array_map(static fn (string $key) => $this->getItem($key), $keys); |
|
| 42 | + return array_map(static fn(string $key) => $this->getItem($key), $keys); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public function hasItem(string $key): bool |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | public function deleteItems(array $keys): bool |
| 61 | 61 | { |
| 62 | - array_map(static fn (string $key) => $this->deleteItem($key), $keys); |
|
| 62 | + array_map(static fn(string $key) => $this->deleteItem($key), $keys); |
|
| 63 | 63 | |
| 64 | 64 | return true; |
| 65 | 65 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | public function commit(): bool |
| 80 | 80 | { |
| 81 | - array_map(static fn (CacheItemInterface $item) => $this->save($item), $this->deferred); |
|
| 81 | + array_map(static fn(CacheItemInterface $item) => $this->save($item), $this->deferred); |
|
| 82 | 82 | |
| 83 | 83 | return true; |
| 84 | 84 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | public function getItems(array $keys = []): array |
| 20 | 20 | { |
| 21 | - return array_map(static fn (string $key) => $this->getItem($key), $keys); |
|
| 21 | + return array_map(static fn(string $key) => $this->getItem($key), $keys); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | public function hasItem(string $key): bool |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function deleteItems(array $keys): bool |
| 46 | 46 | { |
| 47 | - array_map(static fn (string $key) => $this->deleteItem($key), $keys); |
|
| 47 | + array_map(static fn(string $key) => $this->deleteItem($key), $keys); |
|
| 48 | 48 | |
| 49 | 49 | return true; |
| 50 | 50 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | ->fetchAllAssociative(); |
| 34 | 34 | |
| 35 | 35 | return array_map( |
| 36 | - static fn (array $record) => new HistoryRatingDto($record['nickname'], (int) $record['level']), |
|
| 36 | + static fn(array $record) => new HistoryRatingDto($record['nickname'], (int) $record['level']), |
|
| 37 | 37 | $records |
| 38 | 38 | ); |
| 39 | 39 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $this->players = array_reduce( |
| 26 | 26 | $player, |
| 27 | - static function (array $players, Player $player): array { |
|
| 27 | + static function(array $players, Player $player): array { |
|
| 28 | 28 | $players[(string) $player->playerId()] = $player; |
| 29 | 29 | |
| 30 | 30 | return $players; |
@@ -18,8 +18,8 @@ |
||
| 18 | 18 | ]); |
| 19 | 19 | |
| 20 | 20 | // get services (needed for register a single rule) |
| 21 | - $services = $containerConfigurator->services(); |
|
| 21 | + $services = $containerConfigurator->services(); |
|
| 22 | 22 | |
| 23 | 23 | // register a single rule |
| 24 | - $services->set(TypedPropertyRector::class); |
|
| 24 | + $services->set(TypedPropertyRector::class); |
|
| 25 | 25 | }; |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | use Rector\Set\ValueObject\SetList; |
| 8 | 8 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
| 9 | 9 | |
| 10 | -return static function (ContainerConfigurator $containerConfigurator): void { |
|
| 10 | +return static function(ContainerConfigurator $containerConfigurator): void { |
|
| 11 | 11 | // get parameters |
| 12 | 12 | $parameters = $containerConfigurator->parameters(); |
| 13 | 13 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) { |
|
| 4 | - require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php'; |
|
| 3 | +if (file_exists(dirname(__DIR__) . '/var/cache/prod/App_KernelProdContainer.preload.php')) { |
|
| 4 | + require dirname(__DIR__) . '/var/cache/prod/App_KernelProdContainer.preload.php'; |
|
| 5 | 5 | } |