@@ -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 |
@@ -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 | } |
@@ -38,8 +38,7 @@ |
||
38 | 38 | $wikipediaWordDefinitionDto = new WikipediaWordDefinitionDto($payload); |
39 | 39 | |
40 | 40 | return null === $wikipediaWordDefinitionDto->word() ? |
41 | - parent::search($word, $language) : |
|
42 | - str_replace($word, '___', $wikipediaWordDefinitionDto->word()); |
|
41 | + parent::search($word, $language) : str_replace($word, '___', $wikipediaWordDefinitionDto->word()); |
|
43 | 42 | } catch (Throwable) { |
44 | 43 | return parent::search($word, $language); |
45 | 44 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $leftCell = $grid->shiftCell($coordinate->left()); |
93 | 93 | $rightCell = $grid->shiftCell($coordinate->right()); |
94 | 94 | |
95 | - return match ((string) $move->getValue()) { |
|
95 | + return match((string) $move->getValue()) { |
|
96 | 96 | Move::LEFT => $leftCell, |
97 | 97 | Move::RIGHT => $rightCell, |
98 | 98 | }; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | { |
103 | 103 | $coordinate = $cell->coordinate(); |
104 | 104 | |
105 | - return match ((string) $move->getValue()) { |
|
105 | + return match((string) $move->getValue()) { |
|
106 | 106 | Move::LEFT => $grid->shiftCell($coordinate->left()), |
107 | 107 | Move::RIGHT => $grid->shiftCell($coordinate->right()), |
108 | 108 | }; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $topCell = $grid->shiftCell($coordinate->top()); |
95 | 95 | $downCell = $grid->shiftCell($coordinate->down()); |
96 | 96 | |
97 | - return match ((string) $move->getValue()) { |
|
97 | + return match((string) $move->getValue()) { |
|
98 | 98 | Move::TOP => $topCell, |
99 | 99 | Move::DOWN => $downCell, |
100 | 100 | }; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | { |
105 | 105 | $coordinate = $cell->coordinate(); |
106 | 106 | |
107 | - return match ((string) $move->getValue()) { |
|
107 | + return match((string) $move->getValue()) { |
|
108 | 108 | Move::TOP => $grid->shiftCell($coordinate->top()), |
109 | 109 | Move::DOWN => $grid->shiftCell($coordinate->down()), |
110 | 110 | }; |