@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | public function __construct(array $mappers) |
17 | 17 | { |
18 | - $this->mappers = []; |
|
18 | + $this->mappers=[]; |
|
19 | 19 | foreach ($mappers as $mapper) { |
20 | 20 | $this->addMapper($mapper); |
21 | 21 | } |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | { |
26 | 26 | return array_reduce( |
27 | 27 | $this->mappers, |
28 | - function (array $carry, ParamMapperInterface $mapper) use ($request, $propsMap) { |
|
29 | - $carry = array_merge($carry, $mapper->map($request, $propsMap)); |
|
28 | + function(array $carry, ParamMapperInterface $mapper) use ($request, $propsMap) { |
|
29 | + $carry=array_merge($carry, $mapper->map($request, $propsMap)); |
|
30 | 30 | return $carry; |
31 | 31 | }, |
32 | 32 | [] |
@@ -35,6 +35,6 @@ discard block |
||
35 | 35 | |
36 | 36 | private function addMapper(ParamMapperInterface $mapper): void |
37 | 37 | { |
38 | - $this->mappers[] = $mapper; |
|
38 | + $this->mappers[]=$mapper; |
|
39 | 39 | } |
40 | 40 | } |
@@ -9,8 +9,8 @@ discard block |
||
9 | 9 | |
10 | 10 | final class ParamMapperPass implements CompilerPassInterface |
11 | 11 | { |
12 | - public const COLLECTOR_SVC_ID = 'eps.req2cmd.collector.param_collector'; |
|
13 | - public const MAPPER_TAG = 'req2cmd.param_mapper'; |
|
12 | + public const COLLECTOR_SVC_ID='eps.req2cmd.collector.param_collector'; |
|
13 | + public const MAPPER_TAG='req2cmd.param_mapper'; |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * {@inheritdoc} |
@@ -21,20 +21,20 @@ discard block |
||
21 | 21 | return; |
22 | 22 | } |
23 | 23 | |
24 | - $collector = $container->findDefinition(self::COLLECTOR_SVC_ID); |
|
25 | - $mappersDefinitions = $container->findTaggedServiceIds(self::MAPPER_TAG); |
|
26 | - $queue = new \SplPriorityQueue(); |
|
24 | + $collector=$container->findDefinition(self::COLLECTOR_SVC_ID); |
|
25 | + $mappersDefinitions=$container->findTaggedServiceIds(self::MAPPER_TAG); |
|
26 | + $queue=new \SplPriorityQueue(); |
|
27 | 27 | |
28 | 28 | foreach ($mappersDefinitions as $mapperId => $mapperTags) { |
29 | 29 | foreach ($mapperTags as $tagAttributes) { |
30 | - $priority = $tagAttributes['priority'] ?? 0; |
|
30 | + $priority=$tagAttributes['priority'] ?? 0; |
|
31 | 31 | $queue->insert($mapperId, $priority); |
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
35 | - $mappers = []; |
|
35 | + $mappers=[]; |
|
36 | 36 | foreach ($queue as $mapperId) { |
37 | - $mappers[] = new Reference($mapperId); |
|
37 | + $mappers[]=new Reference($mapperId); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | $collector->replaceArgument(0, $mappers); |
@@ -17,12 +17,12 @@ discard block |
||
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'); |
@@ -40,7 +40,7 @@ discard block |
||
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 | } |
@@ -15,9 +15,9 @@ discard block |
||
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()) |
@@ -28,14 +28,14 @@ discard block |
||
28 | 28 | |
29 | 29 | private function addExtractorNode(): NodeDefinition |
30 | 30 | { |
31 | - $builder = new TreeBuilder(); |
|
32 | - $root = $builder->root('extractor'); |
|
31 | + $builder=new TreeBuilder(); |
|
32 | + $root=$builder->root('extractor'); |
|
33 | 33 | $root |
34 | 34 | ->addDefaultsIfNotSet() |
35 | 35 | ->beforeNormalization() |
36 | 36 | ->ifString() |
37 | - ->then(function ($extractorName) { |
|
38 | - return ['service_id' => 'eps.req2cmd.extractor.' . $extractorName]; |
|
37 | + ->then(function($extractorName) { |
|
38 | + return ['service_id' => 'eps.req2cmd.extractor.'.$extractorName]; |
|
39 | 39 | }) |
40 | 40 | ->end() |
41 | 41 | ->children() |