@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | $configurationServiceName = DefaultExecutorConfiguration::class; |
43 | 43 | if (array_key_exists('configuration', $creationOptions)) { |
44 | - $configurationServiceName = $creationOptions['configuration']; |
|
44 | + $configurationServiceName = $creationOptions[ 'configuration' ]; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | if ($appServiceLocator->has($configurationServiceName)) { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | $builderServiceName = FixtureExecutorBuilderInterface::class; |
60 | 60 | if (array_key_exists('builder', $creationOptions)) { |
61 | - $builderServiceName = $creationOptions['builder']; |
|
61 | + $builderServiceName = $creationOptions[ 'builder' ]; |
|
62 | 62 | } |
63 | 63 | if ($appServiceLocator->has($builderServiceName)) { |
64 | 64 | /** @var FixtureExecutorBuilderInterface $builder */ |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $loaderCreationOptions = [ |
82 | 82 | 'contextExecutor' => $executor |
83 | 83 | ]; |
84 | - $fixtureLoader = $fixtureLoaderManager->get($creationOptions['fixturesLoader'], $loaderCreationOptions); |
|
84 | + $fixtureLoader = $fixtureLoaderManager->get($creationOptions[ 'fixturesLoader' ], $loaderCreationOptions); |
|
85 | 85 | |
86 | 86 | $executor->setLoader($fixtureLoader); |
87 | 87 | } |
@@ -94,13 +94,13 @@ discard block |
||
94 | 94 | $filterCreationOptions = [ |
95 | 95 | 'contextExecutor' => $executor |
96 | 96 | ]; |
97 | - $fixtureFilter = $fixtureFilterManager->get($creationOptions['filter'], $filterCreationOptions); |
|
97 | + $fixtureFilter = $fixtureFilterManager->get($creationOptions[ 'filter' ], $filterCreationOptions); |
|
98 | 98 | |
99 | 99 | $executor->setFilter($fixtureFilter); |
100 | 100 | } |
101 | 101 | |
102 | 102 | if (array_key_exists('name', $creationOptions)) { |
103 | - $executor->setName($creationOptions['name']); |
|
103 | + $executor->setName($creationOptions[ 'name' ]); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | return $executor; |
@@ -84,9 +84,9 @@ |
||
84 | 84 | |
85 | 85 | $executors = $this->moduleOptions->getExecutors(); |
86 | 86 | |
87 | - $creationOptions = $executors[$requestedName]; |
|
87 | + $creationOptions = $executors[ $requestedName ]; |
|
88 | 88 | |
89 | - $creationOptions['name'] = $requestedName; |
|
89 | + $creationOptions[ 'name' ] = $requestedName; |
|
90 | 90 | |
91 | 91 | /** @var FixtureExecutorManagerInterface $serviceLocator*/ |
92 | 92 | return $serviceLocator->get(Executor::class, $creationOptions); |
@@ -33,8 +33,8 @@ |
||
33 | 33 | { |
34 | 34 | $creationOptions = $this->getCreationOptions(); |
35 | 35 | |
36 | - $allowedGroupList = array_key_exists('allowedGroupList', $creationOptions) ? $creationOptions['allowedGroupList'] : []; |
|
37 | - $onlyImplementors = array_key_exists('onlyImplementors', $creationOptions) ? (bool)$creationOptions['onlyImplementors'] : false; |
|
36 | + $allowedGroupList = array_key_exists('allowedGroupList', $creationOptions) ? $creationOptions[ 'allowedGroupList' ] : [ ]; |
|
37 | + $onlyImplementors = array_key_exists('onlyImplementors', $creationOptions) ? (bool)$creationOptions[ 'onlyImplementors' ] : false; |
|
38 | 38 | |
39 | 39 | return new GroupedFilter($allowedGroupList, $onlyImplementors); |
40 | 40 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @var array |
41 | 41 | */ |
42 | - protected $fixtureFilterConfig = []; |
|
42 | + protected $fixtureFilterConfig = [ ]; |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * Инициализация фабрики |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | /** @var FixtureFilterManagerInterface $serviceLocator*/ |
95 | 95 | |
96 | 96 | |
97 | - $filtersConfigs = $this->fixtureFilterConfig[$requestedName]; |
|
97 | + $filtersConfigs = $this->fixtureFilterConfig[ $requestedName ]; |
|
98 | 98 | |
99 | 99 | $creationOptions = $this->getCreationOptions(); |
100 | - $contextExecutor = array_key_exists('contextExecutor', $creationOptions) ? $creationOptions['contextExecutor'] : null; |
|
100 | + $contextExecutor = array_key_exists('contextExecutor', $creationOptions) ? $creationOptions[ 'contextExecutor' ] : null; |
|
101 | 101 | |
102 | - $chains = []; |
|
102 | + $chains = [ ]; |
|
103 | 103 | foreach ($filtersConfigs as $index => $item) { |
104 | 104 | if (!is_array($item)) { |
105 | 105 | $errMsg = sprintf( |
@@ -120,18 +120,18 @@ discard block |
||
120 | 120 | throw new Exception\RuntimeException($errMsg); |
121 | 121 | } |
122 | 122 | |
123 | - if (!is_string($item['name'])) { |
|
123 | + if (!is_string($item[ 'name' ])) { |
|
124 | 124 | $errMsg = sprintf( |
125 | 125 | 'Parameter [%s][filters][%s][\'name\'] of type %s is invalid. Must string', |
126 | 126 | Module::CONFIG_KEY, |
127 | 127 | $index, |
128 | - (is_object($item['name']) ? get_class($item['name']) : gettype($item['name'])) |
|
128 | + (is_object($item[ 'name' ]) ? get_class($item[ 'name' ]) : gettype($item[ 'name' ])) |
|
129 | 129 | ); |
130 | 130 | throw new Exception\RuntimeException($errMsg); |
131 | 131 | } |
132 | 132 | |
133 | - $name = $item['name']; |
|
134 | - $options = array_key_exists('options', $item) ? $item['options'] : []; |
|
133 | + $name = $item[ 'name' ]; |
|
134 | + $options = array_key_exists('options', $item) ? $item[ 'options' ] : [ ]; |
|
135 | 135 | if (!is_array($options)) { |
136 | 136 | $errMsg = sprintf( |
137 | 137 | 'Parameter [%s][filters][%s][\'options\'] of type %s is invalid. Must array', |
@@ -142,17 +142,17 @@ discard block |
||
142 | 142 | throw new Exception\RuntimeException($errMsg); |
143 | 143 | } |
144 | 144 | if (null !== $contextExecutor) { |
145 | - $options['contextExecutor'] = $contextExecutor; |
|
145 | + $options[ 'contextExecutor' ] = $contextExecutor; |
|
146 | 146 | } |
147 | 147 | |
148 | - $chains[] = $serviceLocator->get($name, $options); |
|
148 | + $chains[ ] = $serviceLocator->get($name, $options); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | $chainFilterOptions = [ |
152 | 152 | 'filterList' => $chains |
153 | 153 | ]; |
154 | 154 | if (null !== $contextExecutor) { |
155 | - $chainFilterOptions['contextExecutor'] = $contextExecutor; |
|
155 | + $chainFilterOptions[ 'contextExecutor' ] = $contextExecutor; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | return $serviceLocator->get(ChainFilter::class, $chainFilterOptions); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | { |
34 | 34 | $creationOptions = $this->getCreationOptions(); |
35 | 35 | |
36 | - $filterList = array_key_exists('filterList', $creationOptions) ? $creationOptions['filterList'] : []; |
|
36 | + $filterList = array_key_exists('filterList', $creationOptions) ? $creationOptions[ 'filterList' ] : [ ]; |
|
37 | 37 | |
38 | 38 | return new ChainFilter($filterList); |
39 | 39 | } |
@@ -33,6 +33,6 @@ |
||
33 | 33 | throw new Exception\RuntimeException($errMsg); |
34 | 34 | } |
35 | 35 | |
36 | - return new FilterUsedFixture($creationOptions['contextExecutor']); |
|
36 | + return new FilterUsedFixture($creationOptions[ 'contextExecutor' ]); |
|
37 | 37 | } |
38 | 38 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | public function init(ModuleManagerInterface $manager) |
86 | 86 | { |
87 | 87 | if (!$manager instanceof ModuleManager) { |
88 | - $errMsg =sprintf('Module manager not implement %s', ModuleManager::class); |
|
88 | + $errMsg = sprintf('Module manager not implement %s', ModuleManager::class); |
|
89 | 89 | throw new Exception\InvalidArgumentException($errMsg); |
90 | 90 | } |
91 | 91 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | public function onBootstrap(EventInterface $e) |
139 | 139 | { |
140 | 140 | if (!$e instanceof MvcEvent) { |
141 | - $errMsg =sprintf('Event not implement %s', MvcEvent::class); |
|
141 | + $errMsg = sprintf('Event not implement %s', MvcEvent::class); |
|
142 | 142 | throw new Exception\InvalidArgumentException($errMsg); |
143 | 143 | } |
144 | 144 |