Passed
Push — master ( eebbf4...7a551b )
by Jakub
33s
created
src/CommandExtractor/MockCommandExtractor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@  discard block
 block discarded – undo
16 16
      */
17 17
     public function __construct()
18 18
     {
19
-        $this->toReturnForArgs = [];
19
+        $this->toReturnForArgs=[];
20 20
     }
21 21
 
22 22
     /**
23 23
      * {@inheritdoc}
24 24
      */
25
-    public function extractFromRequest(Request $request, string $commandClass, array $additionalProps = [])
25
+    public function extractFromRequest(Request $request, string $commandClass, array $additionalProps=[])
26 26
     {
27
-        $paramsHash = serialize([$request, $commandClass, $additionalProps]);
27
+        $paramsHash=serialize([$request, $commandClass, $additionalProps]);
28 28
         if (array_key_exists($paramsHash, $this->toReturnForArgs)) {
29 29
             return $this->toReturnForArgs[$paramsHash];
30 30
         }
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
     public function willReturn($command): self
36 36
     {
37 37
         if ($this->lastArgsHash !== null) {
38
-            $this->toReturnForArgs[$this->lastArgsHash] = $command;
38
+            $this->toReturnForArgs[$this->lastArgsHash]=$command;
39 39
             return $this;
40 40
         }
41 41
 
42
-        $this->toReturn = $command;
42
+        $this->toReturn=$command;
43 43
 
44 44
         return $this;
45 45
     }
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
         return $this;
50 50
     }
51 51
 
52
-    public function forArguments(Request $request, string $cmdClass, array $additionalProps = []): self
52
+    public function forArguments(Request $request, string $cmdClass, array $additionalProps=[]): self
53 53
     {
54
-        $this->lastArgsHash = serialize([$request, $cmdClass, $additionalProps]);
54
+        $this->lastArgsHash=serialize([$request, $cmdClass, $additionalProps]);
55 55
 
56 56
         return $this;
57 57
     }
Please login to merge, or discard this patch.
src/CommandExtractor/CommandExtractorInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,5 +13,5 @@
 block discarded – undo
13 13
      * @param array $additionalProps
14 14
      * @return mixed
15 15
      */
16
-    public function extractFromRequest(Request $request, string $commandClass, array $additionalProps = []);
16
+    public function extractFromRequest(Request $request, string $commandClass, array $additionalProps=[]);
17 17
 }
Please login to merge, or discard this patch.
src/CommandExtractor/JMSSerializerCommandExtractor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,23 +21,23 @@
 block discarded – undo
21 21
 
22 22
     public function __construct(SerializerInterface $jmsSerializer, ArrayTransformerInterface $jmsArrayTransformer)
23 23
     {
24
-        $this->jmsSerializer = $jmsSerializer;
25
-        $this->jmsArrayTransformer = $jmsArrayTransformer;
24
+        $this->jmsSerializer=$jmsSerializer;
25
+        $this->jmsArrayTransformer=$jmsArrayTransformer;
26 26
     }
27 27
 
28 28
     /**
29 29
      * {@inheritdoc}
30 30
      * @throws \LogicException
31 31
      */
32
-    public function extractFromRequest(Request $request, string $commandClass, array $additionalProps = [])
32
+    public function extractFromRequest(Request $request, string $commandClass, array $additionalProps=[])
33 33
     {
34 34
         if (!empty($additionalProps)) {
35
-            $decodedContent = $this->jmsSerializer->deserialize(
35
+            $decodedContent=$this->jmsSerializer->deserialize(
36 36
                 $request->getContent(),
37 37
                 'array',
38 38
                 $request->getRequestFormat()
39 39
             );
40
-            $finalProps = array_merge($decodedContent, $additionalProps);
40
+            $finalProps=array_merge($decodedContent, $additionalProps);
41 41
             return $this->jmsArrayTransformer->fromArray($finalProps, $commandClass);
42 42
         }
43 43
 
Please login to merge, or discard this patch.
src/DependencyInjection/Req2CmdExtension.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function load(array $configs, ContainerBuilder $container): void
19 19
     {
20
-        $configuration = new Req2CmdConfiguration();
21
-        $config = $this->processConfiguration($configuration, $configs);
20
+        $configuration=new Req2CmdConfiguration();
21
+        $config=$this->processConfiguration($configuration, $configs);
22 22
 
23
-        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
23
+        $loader=new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
24 24
 
25 25
         $loader->load('actions.xml');
26 26
         $loader->load('extractors.xml');
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
40 40
 
41 41
     private function configureExtractors(array $config, ContainerBuilder $container): void
42 42
     {
43
-        $extractorId = (string)$config['extractor']['service_id'];
43
+        $extractorId=(string) $config['extractor']['service_id'];
44 44
         $container->setAlias('eps.req2cmd.extractor', $extractorId);
45 45
     }
46 46
 
47 47
     private function configureCommandBus(array $config, ContainerBuilder $container): void
48 48
     {
49
-        $commandBusId = (string)$config['command_bus']['service_id'];
49
+        $commandBusId=(string) $config['command_bus']['service_id'];
50 50
         if ($commandBusId === 'eps.req2cmd.command_bus.tactician') {
51
-            $busName = (string)$config['command_bus']['name'];
52
-            $tacticianServiceName = 'tactician.commandbus.' . $busName;
53
-            $busDefinition = $container->findDefinition('eps.req2cmd.command_bus.tactician');
51
+            $busName=(string) $config['command_bus']['name'];
52
+            $tacticianServiceName='tactician.commandbus.'.$busName;
53
+            $busDefinition=$container->findDefinition('eps.req2cmd.command_bus.tactician');
54 54
             $busDefinition->replaceArgument(0, new Reference($tacticianServiceName));
55 55
         }
56 56
 
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
 
60 60
     private function configureEventListeners(array $config, ContainerBuilder $container): void
61 61
     {
62
-        foreach ((array)$config['listeners'] as $listenerName => $listenerConfig) {
63
-            $listenerId = $this->getListenerSvcIdByAlias($listenerName);
62
+        foreach ((array) $config['listeners'] as $listenerName => $listenerConfig) {
63
+            $listenerId=$this->getListenerSvcIdByAlias($listenerName);
64 64
 
65 65
             if (!$listenerConfig['enabled']) {
66 66
                 $container->removeDefinition($listenerId);
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
 
74 74
     private function configureEventListener(ContainerBuilder $container, string $listenerId, array $listenerCfg): void
75 75
     {
76
-        $definition = $container->findDefinition($listenerId);
77
-        $serviceTags = $definition->getTags();
76
+        $definition=$container->findDefinition($listenerId);
77
+        $serviceTags=$definition->getTags();
78 78
 
79 79
         array_walk(
80 80
             $serviceTags['kernel.event_listener'],
81
-            function (&$tag) use ($listenerCfg) {
82
-                $tag['priority'] = $listenerCfg['priority'];
81
+            function(&$tag) use ($listenerCfg) {
82
+                $tag['priority']=$listenerCfg['priority'];
83 83
             }
84 84
         );
85 85
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     private function getListenerSvcIdByAlias(string $alias): string
90 90
     {
91
-        $listenersMap = [
91
+        $listenersMap=[
92 92
             'extractor' => 'eps.req2cmd.listener.extract_command'
93 93
         ];
94 94
 
Please login to merge, or discard this patch.
src/Params/ParameterMapper/PathParamsMapper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 class PathParamsMapper implements ParamMapperInterface
10 10
 {
11
-    private const REQUIRED_PROPERTY_PREFIX = '!';
11
+    private const REQUIRED_PROPERTY_PREFIX='!';
12 12
 
13 13
     public function map(Request $request, array $propsMap): array
14 14
     {
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
             return [];
17 17
         }
18 18
 
19
-        $pathProps = (array)$propsMap['path'];
20
-        $result = [];
19
+        $pathProps=(array) $propsMap['path'];
20
+        $result=[];
21 21
         foreach ($pathProps as $paramName => $paramValue) {
22
-            if ($required = $this->isParamRequired($paramName)) {
23
-                $paramName = substr($paramName, 1);
22
+            if ($required=$this->isParamRequired($paramName)) {
23
+                $paramName=substr($paramName, 1);
24 24
                 $this->assertRequiredParamIsPresent($paramName, $request);
25 25
             }
26 26
 
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
                 continue;
29 29
             }
30 30
 
31
-            $finalPropName = $paramValue ?? $paramName;
32
-            $result[$finalPropName] = $request->attributes->get($paramName);
31
+            $finalPropName=$paramValue ?? $paramName;
32
+            $result[$finalPropName]=$request->attributes->get($paramName);
33 33
         }
34 34
 
35 35
         return $result;
Please login to merge, or discard this patch.