@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * |
30 | 30 | * @param array $contextData |
31 | 31 | */ |
32 | - public function __construct(array $contextData = []) |
|
32 | + public function __construct(array $contextData = [ ]) |
|
33 | 33 | { |
34 | 34 | $this->setContextData($contextData); |
35 | 35 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | { |
75 | 75 | $fixture = $event->getFixture(); |
76 | 76 | |
77 | - if (! ($fixture instanceof ObjectManagerNameAwareInterface)) { |
|
77 | + if (!($fixture instanceof ObjectManagerNameAwareInterface)) { |
|
78 | 78 | return; |
79 | 79 | } |
80 | 80 |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * |
43 | 43 | * @var array |
44 | 44 | */ |
45 | - protected $fixtureInitializer = []; |
|
45 | + protected $fixtureInitializer = [ ]; |
|
46 | 46 | |
47 | 47 | /** |
48 | 48 | * Инициалайзеры, создаваемые заново перед каждым запуском фикстур. При создание этих инициайзеров, им передаются |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * |
51 | 51 | * @var array |
52 | 52 | */ |
53 | - protected $contextInitializer = []; |
|
53 | + protected $contextInitializer = [ ]; |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * Возвращает конфиг фикстур |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * |
70 | 70 | * @return $this |
71 | 71 | */ |
72 | - public function setFixturesLoaders(array $fixturesLoaders = []) |
|
72 | + public function setFixturesLoaders(array $fixturesLoaders = [ ]) |
|
73 | 73 | { |
74 | 74 | $this->fixturesLoaders = $fixturesLoaders; |
75 | 75 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * |
94 | 94 | * @return $this |
95 | 95 | */ |
96 | - public function setFilters(array $filters = []) |
|
96 | + public function setFilters(array $filters = [ ]) |
|
97 | 97 | { |
98 | 98 | $this->filters = $filters; |
99 | 99 |
@@ -35,13 +35,13 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function createService(ServiceLocatorInterface $serviceLocator) |
37 | 37 | { |
38 | - $appServiceLocator = $serviceLocator instanceof AbstractPluginManager ? $serviceLocator->getServiceLocator() :$serviceLocator; |
|
38 | + $appServiceLocator = $serviceLocator instanceof AbstractPluginManager ? $serviceLocator->getServiceLocator() : $serviceLocator; |
|
39 | 39 | |
40 | 40 | $creationOptions = $this->getCreationOptions(); |
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 */ |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $loaderCreationOptions = [ |
87 | 87 | 'contextExecutor' => $executor |
88 | 88 | ]; |
89 | - $fixtureLoader = $fixtureLoaderManager->get($creationOptions['fixturesLoader'], $loaderCreationOptions); |
|
89 | + $fixtureLoader = $fixtureLoaderManager->get($creationOptions[ 'fixturesLoader' ], $loaderCreationOptions); |
|
90 | 90 | |
91 | 91 | $executor->setLoader($fixtureLoader); |
92 | 92 | } |
@@ -99,13 +99,13 @@ discard block |
||
99 | 99 | $filterCreationOptions = [ |
100 | 100 | 'contextExecutor' => $executor |
101 | 101 | ]; |
102 | - $fixtureFilter = $fixtureFilterManager->get($creationOptions['filter'], $filterCreationOptions); |
|
102 | + $fixtureFilter = $fixtureFilterManager->get($creationOptions[ 'filter' ], $filterCreationOptions); |
|
103 | 103 | |
104 | 104 | $executor->setFilter($fixtureFilter); |
105 | 105 | } |
106 | 106 | |
107 | 107 | if (array_key_exists('name', $creationOptions)) { |
108 | - $executor->setName($creationOptions['name']); |
|
108 | + $executor->setName($creationOptions[ 'name' ]); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | /** @var ModuleOptionsPluginManagerInterface $moduleOptionsPluginManager */ |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * |
70 | 70 | * @var array |
71 | 71 | */ |
72 | - protected $contextInitializer = []; |
|
72 | + protected $contextInitializer = [ ]; |
|
73 | 73 | |
74 | 74 | /** |
75 | 75 | * Менеджер Initializer'ов |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | * |
197 | 197 | * @return void |
198 | 198 | */ |
199 | - public function import(array $contextData = []) |
|
199 | + public function import(array $contextData = [ ]) |
|
200 | 200 | { |
201 | 201 | $this->execute(FixtureExecutor::IMPORT, $contextData); |
202 | 202 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | * |
210 | 210 | * @return void |
211 | 211 | */ |
212 | - protected function execute($method, array $contextData = []) |
|
212 | + protected function execute($method, array $contextData = [ ]) |
|
213 | 213 | { |
214 | 214 | $loader = $this->getLoader(); |
215 | 215 | $filter = $this->getFilter(); |
@@ -217,10 +217,10 @@ discard block |
||
217 | 217 | $contextInitializer = $this->getContextInitializer(); |
218 | 218 | $fixtureInitializerManager = $this->getFixtureInitializerManager(); |
219 | 219 | $eventManager = $this->getConfiguration()->getEventManager(); |
220 | - $initializers = []; |
|
220 | + $initializers = [ ]; |
|
221 | 221 | foreach ($contextInitializer as $initializerName) { |
222 | 222 | $initializer = $fixtureInitializerManager->get($initializerName, $contextData); |
223 | - $initializers[] = $initializer; |
|
223 | + $initializers[ ] = $initializer; |
|
224 | 224 | $eventManager->addEventSubscriber($initializer); |
225 | 225 | } |
226 | 226 | |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | * |
238 | 238 | * @return void |
239 | 239 | */ |
240 | - public function purge(array $contextData = []) |
|
240 | + public function purge(array $contextData = [ ]) |
|
241 | 241 | { |
242 | 242 | $this->execute(FixtureExecutor::PURGE, $contextData); |
243 | 243 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | /** @var FixtureExecutorBuilderInterface $builder */ |
43 | 43 | $builder = $appServiceLocator->get(FixtureExecutorBuilderInterface::class); |
44 | 44 | |
45 | - /** @var FixtureInitializerManagerInterface $fixtureInitializerManager */ |
|
45 | + /** @var FixtureInitializerManagerInterface $fixtureInitializerManager */ |
|
46 | 46 | $fixtureInitializerManager = $appServiceLocator->get(FixtureInitializerManagerInterface::class); |
47 | 47 | |
48 | 48 | $executor = new ClassListFixtureExecutor($configuration, $builder, $fixtureInitializerManager); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function createService(ServiceLocatorInterface $serviceLocator) |
35 | 35 | { |
36 | - $appServiceLocator = $serviceLocator instanceof AbstractPluginManager ? $serviceLocator->getServiceLocator() :$serviceLocator; |
|
36 | + $appServiceLocator = $serviceLocator instanceof AbstractPluginManager ? $serviceLocator->getServiceLocator() : $serviceLocator; |
|
37 | 37 | |
38 | 38 | $creationOptions = $this->getCreationOptions(); |
39 | 39 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | /** @var FixtureLoaderManagerInterface $fixtureLoaderManager */ |
52 | 52 | $fixtureLoaderManager = $appServiceLocator->get(FixtureLoaderManagerInterface::class); |
53 | 53 | |
54 | - $classList = array_key_exists('classList', $creationOptions) ? $creationOptions['classList'] : []; |
|
54 | + $classList = array_key_exists('classList', $creationOptions) ? $creationOptions[ 'classList' ] : [ ]; |
|
55 | 55 | |
56 | 56 | $classLoaderCreationOptions = [ |
57 | 57 | 'classList' => $classList |
@@ -60,11 +60,11 @@ discard block |
||
60 | 60 | { |
61 | 61 | $method = $this->getExecutorMethod(); |
62 | 62 | |
63 | - $contextData = []; |
|
63 | + $contextData = [ ]; |
|
64 | 64 | $objectManagerName = $this->getObjectManagerName(); |
65 | 65 | |
66 | 66 | if (null !== $objectManagerName) { |
67 | - $contextData['objectManagerName'] = $objectManagerName; |
|
67 | + $contextData[ 'objectManagerName' ] = $objectManagerName; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $classList = $this->getFixtureClassList(); |
@@ -161,10 +161,10 @@ discard block |
||
161 | 161 | $executorName = $this->getExecutorName(); |
162 | 162 | $method = $this->getObjectManagerName(); |
163 | 163 | |
164 | - $contextData = []; |
|
164 | + $contextData = [ ]; |
|
165 | 165 | $objectManagerName = $this->getObjectManagerName(); |
166 | 166 | if (null !== $objectManagerName) { |
167 | - $contextData['objectManagerName'] = $objectManagerName; |
|
167 | + $contextData[ 'objectManagerName' ] = $objectManagerName; |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | $executor = $this->getFixtureExecutorManager()->get($executorName); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * @param $method |
184 | 184 | * @param array $contextData |
185 | 185 | */ |
186 | - protected function runFixture(ExecutorInterface $executor, $method, array $contextData = []) |
|
186 | + protected function runFixture(ExecutorInterface $executor, $method, array $contextData = [ ]) |
|
187 | 187 | { |
188 | 188 | $console = $this->getConsole(); |
189 | 189 | $console->writeLine(sprintf('Run fixture executor %s', $executor->getName())); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $listener = $eventSharedManager->attach( |
193 | 193 | ExecutorDispatcherInterface::class, |
194 | 194 | ExecutorDispatcherEvent::class, |
195 | - function (ExecutorDispatcherEvent $e) use ($console) { |
|
195 | + function(ExecutorDispatcherEvent $e) use ($console) { |
|
196 | 196 | $console->writeLine(sprintf('Execute fixture: %s', get_class($e->getFixture()))); |
197 | 197 | } |
198 | 198 | ); |
@@ -180,7 +180,7 @@ |
||
180 | 180 | * Запуск выполнения фикстур |
181 | 181 | * |
182 | 182 | * @param ExecutorInterface $executor |
183 | - * @param $method |
|
183 | + * @param string $method |
|
184 | 184 | * @param array $contextData |
185 | 185 | */ |
186 | 186 | protected function runFixture(ExecutorInterface $executor, $method, array $contextData = []) |