Passed
Push — master ( 1d8bae...a79f58 )
by Vadim
02:18
created
src/DependencyInjection/Configuration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      */
59 59
     private function createMiddlewareNormalizer(): callable
60 60
     {
61
-        return function (mixed $middlewareName): string {
61
+        return function(mixed $middlewareName): string {
62 62
             if (!\is_string($middlewareName) || !\is_a($middlewareName, MiddlewareInterface::class, true)) {
63 63
                 throw new \RuntimeException(
64 64
                     vsprintf('Each middleware must implements the "%s" interface, but "%s" doesn\'t.', [
Please login to merge, or discard this patch.
src/Integration/ControllerReplacer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         return new MiddlewareRunner(
63 63
             $middlewares,
64 64
             new SymfonyActionRequestHandler(
65
-                function (Request $request) use ($destination, $arguments): Response {
65
+                function(Request $request) use ($destination, $arguments): Response {
66 66
                     /** @var Response */
67 67
                     return $destination(...$this->withReplacedRequest($request, $arguments));
68 68
                 },
Please login to merge, or discard this patch.
src/Attribute/Reader/ClassMethodAttributeReader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
             );
28 28
         }
29 29
 
30
-        return array_map(static function (\ReflectionAttribute $attribute): object {
30
+        return array_map(static function(\ReflectionAttribute $attribute): object {
31 31
             /** @var Middleware */
32 32
             return $attribute->newInstance();
33 33
         }, $attributes);
Please login to merge, or discard this patch.
src/Middleware/MiddlewareGatherer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function gather(array $attributes): array
28 28
     {
29
-        $middlewaresOrGroups = array_unique(array_merge(...array_map(function (Middleware $middleware): array {
29
+        $middlewaresOrGroups = array_unique(array_merge(...array_map(function(Middleware $middleware): array {
30 30
             return $middleware->list;
31 31
         }, $attributes)));
32 32
 
Please login to merge, or discard this patch.
src/Middleware/MiddlewareRunner.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@
 block discarded – undo
39 39
         $processor = array_reduce(
40 40
             array_reverse($this->middlewares),
41 41
             /** @param \Closure(ServerRequestInterface): ResponseInterface $stack */
42
-            function (\Closure $stack, MiddlewareInterface $middleware): \Closure {
43
-                return function (ServerRequestInterface $request) use ($middleware, $stack): ResponseInterface {
42
+            function(\Closure $stack, MiddlewareInterface $middleware): \Closure {
43
+                return function(ServerRequestInterface $request) use ($middleware, $stack): ResponseInterface {
44 44
                     return $middleware->process($request, new StackMiddleware($stack));
45 45
                 };
46 46
             },
47
-            fn (ServerRequestInterface $request): ResponseInterface => $this->requestHandler->handle($request),
47
+            fn(ServerRequestInterface $request): ResponseInterface => $this->requestHandler->handle($request),
48 48
         );
49 49
 
50 50
         return $this->psrResponseTransformer->fromPsrResponse($processor($serverRequest));
Please login to merge, or discard this patch.
src/Middleware/Registry/ServiceLocatorMiddlewareRegistry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         $middlewares = [];
49 49
 
50 50
         if (!isset($this->groups[$middlewareFqcnOrGroup]['if']) || $this->groups[$middlewareFqcnOrGroup]['if']) {
51
-            $middlewares = array_map(function (string $middlewareFqcn): MiddlewareInterface {
51
+            $middlewares = array_map(function(string $middlewareFqcn): MiddlewareInterface {
52 52
                 /** @var MiddlewareInterface */
53 53
                 return $this->container->get($middlewareFqcn);
54 54
             }, $this->groups[$middlewareFqcnOrGroup]['middlewares']
Please login to merge, or discard this patch.
src/Resources/config/symiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
6 6
 use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
7 7
 
8
-return static function (ContainerConfigurator $configurator): void {
8
+return static function(ContainerConfigurator $configurator): void {
9 9
     $services = $configurator->services();
10 10
 
11 11
     $services->set(Kafkiansky\SymfonyMiddleware\Attribute\Reader\ClassMethodAttributeReader::class);
Please login to merge, or discard this patch.