@@ -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 = []) |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | * |
| 19 | 19 | * @var array |
| 20 | 20 | */ |
| 21 | - protected $classFixtureToResourceLoader = []; |
|
| 21 | + protected $classFixtureToResourceLoader = [ ]; |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * Менеджер плагинов, отвечающиз за загрузку ресурсов для фикстур |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | * |
| 55 | 55 | * @return $this |
| 56 | 56 | */ |
| 57 | - public function setClassFixtureToResourceLoader(array $classFixtureToResourceLoader = []) |
|
| 57 | + public function setClassFixtureToResourceLoader(array $classFixtureToResourceLoader = [ ]) |
|
| 58 | 58 | { |
| 59 | 59 | $this->classFixtureToResourceLoader = $classFixtureToResourceLoader; |
| 60 | 60 | |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | { |
| 53 | 53 | $fixture = $event->getFixture(); |
| 54 | 54 | |
| 55 | - if (! ($fixture instanceof ObjectManagerNameAwareInterface)) { |
|
| 55 | + if (!($fixture instanceof ObjectManagerNameAwareInterface)) { |
|
| 56 | 56 | return; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -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,14 +50,14 @@ discard block |
||
| 50 | 50 | * |
| 51 | 51 | * @var array |
| 52 | 52 | */ |
| 53 | - protected $contextInitializer = []; |
|
| 53 | + protected $contextInitializer = [ ]; |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * Секция в которой описывается какой загрузчик ресурсво нужно применять, для фикстуры |
| 57 | 57 | * |
| 58 | 58 | * @var array |
| 59 | 59 | */ |
| 60 | - protected $resourceLoader = []; |
|
| 60 | + protected $resourceLoader = [ ]; |
|
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * Возвращает конфиг фикстур |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * |
| 77 | 77 | * @return $this |
| 78 | 78 | */ |
| 79 | - public function setFixturesLoaders(array $fixturesLoaders = []) |
|
| 79 | + public function setFixturesLoaders(array $fixturesLoaders = [ ]) |
|
| 80 | 80 | { |
| 81 | 81 | $this->fixturesLoaders = $fixturesLoaders; |
| 82 | 82 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * |
| 101 | 101 | * @return $this |
| 102 | 102 | */ |
| 103 | - public function setFilters(array $filters = []) |
|
| 103 | + public function setFilters(array $filters = [ ]) |
|
| 104 | 104 | { |
| 105 | 105 | $this->filters = $filters; |
| 106 | 106 | |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | * |
| 199 | 199 | * @return $this |
| 200 | 200 | */ |
| 201 | - public function setResourceLoader(array $resourceLoader = []) |
|
| 201 | + public function setResourceLoader(array $resourceLoader = [ ]) |
|
| 202 | 202 | { |
| 203 | 203 | $this->resourceLoader = $resourceLoader; |
| 204 | 204 | |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | 'resourceLoader' => [ |
| 38 | 38 | 'fixtureName' => [ |
| 39 | 39 | 'name' => 'resourceLoaderName', |
| 40 | - 'options' => [] |
|
| 40 | + 'options' => [ ] |
|
| 41 | 41 | ] |
| 42 | 42 | ], |
| 43 | 43 | |