Completed
Push — master ( e39a6b...d536ea )
by Jakub
01:57
created
src/DependencyInjection/Req2CmdConfiguration.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function getConfigTreeBuilder(): TreeBuilder
17 17
     {
18
-        $builder = new TreeBuilder();
18
+        $builder=new TreeBuilder();
19 19
 
20
-        $root = $builder->root('req2cmd');
20
+        $root=$builder->root('req2cmd');
21 21
         $root
22 22
             ->children()
23 23
                 ->append($this->addExtractorNode())
@@ -29,14 +29,14 @@  discard block
 block discarded – undo
29 29
 
30 30
     private function addExtractorNode(): NodeDefinition
31 31
     {
32
-        $builder = new TreeBuilder();
33
-        $root = $builder->root('extractor');
32
+        $builder=new TreeBuilder();
33
+        $root=$builder->root('extractor');
34 34
         $root
35 35
             ->addDefaultsIfNotSet()
36 36
             ->beforeNormalization()
37 37
                 ->ifString()
38
-                ->then(function ($extractorName) {
39
-                    return ['service_id' => 'eps.req2cmd.extractor.' . $extractorName];
38
+                ->then(function($extractorName) {
39
+                    return ['service_id' => 'eps.req2cmd.extractor.'.$extractorName];
40 40
                 })
41 41
             ->end()
42 42
             ->children()
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
 
52 52
     private function addCommandBusNode(): NodeDefinition
53 53
     {
54
-        $builder = new TreeBuilder();
55
-        $node = $builder->root('command_bus');
54
+        $builder=new TreeBuilder();
55
+        $node=$builder->root('command_bus');
56 56
         $node
57 57
             ->addDefaultsIfNotSet()
58 58
             ->beforeNormalization()
59 59
                 ->ifString()
60
-                ->then(function (string $svcId) {
61
-                    return ['service_id' => 'eps.req2cmd.command_bus.' . $svcId];
60
+                ->then(function(string $svcId) {
61
+                    return ['service_id' => 'eps.req2cmd.command_bus.'.$svcId];
62 62
                 })
63 63
             ->end()
64 64
             ->children()
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
                 ->end()
73 73
             ->end()
74 74
             ->validate()
75
-                ->ifTrue(function ($config) {
75
+                ->ifTrue(function($config) {
76 76
                     return $config['service_id'] !== 'eps.req2cmd.command_bus.tactician';
77 77
                 })
78
-                ->then(function ($config) {
78
+                ->then(function($config) {
79 79
                     unset($config['name']);
80 80
                     return $config;
81 81
                 })
Please login to merge, or discard this patch.
src/DependencyInjection/Req2CmdExtension.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@  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(
23
+        $loader=new XmlFileLoader(
24 24
             $container,
25
-            new FileLocator(__DIR__ . '/../Resources/config')
25
+            new FileLocator(__DIR__.'/../Resources/config')
26 26
         );
27 27
 
28 28
         $loader->load('actions.xml');
@@ -42,17 +42,17 @@  discard block
 block discarded – undo
42 42
 
43 43
     private function configureExtractors(array $config, ContainerBuilder $container): void
44 44
     {
45
-        $extractorId = (string)$config['extractor']['service_id'];
45
+        $extractorId=(string) $config['extractor']['service_id'];
46 46
         $container->setAlias('eps.req2cmd.extractor', $extractorId);
47 47
     }
48 48
 
49 49
     private function configureCommandBus(array $config, ContainerBuilder $container): void
50 50
     {
51
-        $commandBusId = (string)$config['command_bus']['service_id'];
51
+        $commandBusId=(string) $config['command_bus']['service_id'];
52 52
         if ($commandBusId === 'eps.req2cmd.command_bus.tactician') {
53
-            $busName = (string)$config['command_bus']['name'];
54
-            $tacticianServiceName = 'tactician.commandbus.' . $busName;
55
-            $busDefinition = $container->findDefinition('eps.req2cmd.command_bus.tactician');
53
+            $busName=(string) $config['command_bus']['name'];
54
+            $tacticianServiceName='tactician.commandbus.'.$busName;
55
+            $busDefinition=$container->findDefinition('eps.req2cmd.command_bus.tactician');
56 56
             $busDefinition->replaceArgument(0, new Reference($tacticianServiceName));
57 57
         }
58 58
 
Please login to merge, or discard this patch.
src/CommandBus/TacticianCommandBus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
     public function __construct(CommandBus $commandBus)
16 16
     {
17
-        $this->commandBus = $commandBus;
17
+        $this->commandBus=$commandBus;
18 18
     }
19 19
 
20 20
     public function handleCommand($command): void
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(CommandBusInterface $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.