@@ -94,6 +94,6 @@ |
||
| 94 | 94 | throw new Exception\RuntimeException($errMsg); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - return $context[$name]; |
|
| 97 | + return $context[ $name ]; |
|
| 98 | 98 | } |
| 99 | 99 | } |
@@ -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 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $errMsg = 'Executor name is not defined'; |
| 87 | 87 | throw new Exception\RuntimeException($errMsg); |
| 88 | 88 | } |
| 89 | - $method = $request->getParam('method', null); |
|
| 89 | + $method = $request->getParam('method', null); |
|
| 90 | 90 | if (null === $method) { |
| 91 | 91 | $errMsg = 'Executor method not defined'; |
| 92 | 92 | throw new Exception\RuntimeException($errMsg); |
@@ -97,10 +97,10 @@ discard block |
||
| 97 | 97 | throw new Exception\RuntimeException($errMsg); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - $contextData = []; |
|
| 100 | + $contextData = [ ]; |
|
| 101 | 101 | $objectManagerName = $request->getParam('object-manager', null); |
| 102 | 102 | if (null !== $objectManagerName) { |
| 103 | - $contextData['objectManagerName'] = $objectManagerName; |
|
| 103 | + $contextData[ 'objectManagerName' ] = $objectManagerName; |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | $executor = $this->getFixtureExecutorManager()->get($executorName); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $listener = $eventSharedManager->attach( |
| 113 | 113 | ExecutorDispatcherInterface::class, |
| 114 | 114 | ExecutorDispatcherEvent::class, |
| 115 | - function (ExecutorDispatcherEvent $e) use ($console) { |
|
| 115 | + function(ExecutorDispatcherEvent $e) use ($console) { |
|
| 116 | 116 | $console->writeLine(sprintf('Execute fixture: %s', get_class($e->getFixture()))); |
| 117 | 117 | } |
| 118 | 118 | ); |
@@ -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 | } |