Passed
Push — master ( a08d02...d2cfac )
by Jakub
02:56
created
src/CommandExtractor/SerializerCommandExtractor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
     public function __construct(SerializerInterface $serializer)
17 17
     {
18
-        $this->serializer = $serializer;
18
+        $this->serializer=$serializer;
19 19
     }
20 20
 
21 21
     /**
Please login to merge, or discard this patch.
src/CommandExtractor/MockCommandExtractor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 
20 20
     public function willReturn($command): void
21 21
     {
22
-        $this->toReturn = $command;
22
+        $this->toReturn=$command;
23 23
     }
24 24
 }
Please login to merge, or discard this patch.
src/EventListener/ExtractCommandFromRequestListener.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 
9 9
 class ExtractCommandFromRequestListener
10 10
 {
11
-    public const API_RESPONDER_CONTROLLER = 'eps.req2cmd.action.api_responder';
12
-    public const CMD_CLASS_PARAM = '_command_class';
13
-    public const CMD_PARAM = '_command';
14
-    private const CONTROLLER_PARAM = '_controller';
11
+    public const API_RESPONDER_CONTROLLER='eps.req2cmd.action.api_responder';
12
+    public const CMD_CLASS_PARAM='_command_class';
13
+    public const CMD_PARAM='_command';
14
+    private const CONTROLLER_PARAM='_controller';
15 15
 
16 16
     /**
17 17
      * @var CommandExtractorInterface
@@ -20,18 +20,18 @@  discard block
 block discarded – undo
20 20
 
21 21
     public function __construct(CommandExtractorInterface $extractor)
22 22
     {
23
-        $this->extractor = $extractor;
23
+        $this->extractor=$extractor;
24 24
     }
25 25
 
26 26
     public function onKernelRequest(GetResponseEvent $event): void
27 27
     {
28
-        $request = $event->getRequest();
29
-        $commandClass = $request->attributes->get(self::CMD_CLASS_PARAM);
28
+        $request=$event->getRequest();
29
+        $commandClass=$request->attributes->get(self::CMD_CLASS_PARAM);
30 30
         if ($commandClass === null) {
31 31
             return;
32 32
         }
33 33
 
34
-        $command = $this->extractor->extractFromRequest($request, $commandClass);
34
+        $command=$this->extractor->extractFromRequest($request, $commandClass);
35 35
 
36 36
         $request->attributes->set(self::CMD_PARAM, $command);
37 37
         $request->attributes->remove(self::CMD_CLASS_PARAM);
Please login to merge, or discard this patch.
src/Serializer/DeserializableCommandDenormalizer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,15 +11,15 @@
 block discarded – undo
11 11
     /**
12 12
      * {@inheritdoc}
13 13
      */
14
-    public function denormalize($data, $class, $format = null, array $context = [])
14
+    public function denormalize($data, $class, $format=null, array $context=[])
15 15
     {
16
-        return call_user_func($class . '::fromArray', $data);
16
+        return call_user_func($class.'::fromArray', $data);
17 17
     }
18 18
 
19 19
     /**
20 20
      * {@inheritdoc}
21 21
      */
22
-    public function supportsDenormalization($data, $type, $format = null): bool
22
+    public function supportsDenormalization($data, $type, $format=null): bool
23 23
     {
24 24
         return is_subclass_of($type, DeserializableCommandInterface::class);
25 25
     }
Please login to merge, or discard this patch.
src/Action/ApiResponderAction.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
 
17 17
     public function __construct(CommandBus $commandBus)
18 18
     {
19
-        $this->commandBus = $commandBus;
19
+        $this->commandBus=$commandBus;
20 20
     }
21 21
 
22 22
     public function __invoke(Request $request): Response
23 23
     {
24
-        $command = $request->attributes->get('_command');
24
+        $command=$request->attributes->get('_command');
25 25
         if ($command === null) {
26 26
             throw new \InvalidArgumentException('No _command argument found for action');
27 27
         }
@@ -34,16 +34,16 @@  discard block
 block discarded – undo
34 34
     {
35 35
         switch ($request->getMethod()) {
36 36
             case Request::METHOD_PUT:
37
-                $statusCode = Response::HTTP_OK;
37
+                $statusCode=Response::HTTP_OK;
38 38
                 break;
39 39
             case Request::METHOD_POST:
40
-                $statusCode = Response::HTTP_CREATED;
40
+                $statusCode=Response::HTTP_CREATED;
41 41
                 break;
42 42
             case Request::METHOD_DELETE:
43
-                $statusCode = Response::HTTP_NO_CONTENT;
43
+                $statusCode=Response::HTTP_NO_CONTENT;
44 44
                 break;
45 45
             default:
46
-                $statusCode = Response::HTTP_OK;
46
+                $statusCode=Response::HTTP_OK;
47 47
         }
48 48
 
49 49
         return $statusCode;
Please login to merge, or discard this patch.
src/DependencyInjection/Request2CommandBusExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@
 block discarded – undo
16 16
      */
17 17
     public function load(array $configs, ContainerBuilder $container): void
18 18
     {
19
-        $loader = new XmlFileLoader(
19
+        $loader=new XmlFileLoader(
20 20
             $container,
21
-            new FileLocator(__DIR__ . '/../Resources/config')
21
+            new FileLocator(__DIR__.'/../Resources/config')
22 22
         );
23 23
 
24 24
         $loader->load('actions.xml');
Please login to merge, or discard this patch.
src/Request2CommandBusBundle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     public function getContainerExtension(): Extension
13 13
     {
14 14
         if ($this->extension === null) {
15
-            $this->extension = new Request2CommandBusExtension();
15
+            $this->extension=new Request2CommandBusExtension();
16 16
         }
17 17
 
18 18
         return $this->extension;
Please login to merge, or discard this patch.