Completed
Push — dev ( 2bd8d3...3ec327 )
by Андрей
03:02
created
src/Executor/ExecutorFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 */
Please login to merge, or discard this patch.
src/Executor/Executor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Executor/ClassListFixtureExecutorFactory.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Controller/ExecutorController.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@
 block discarded – undo
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 = [])
Please login to merge, or discard this patch.
src/ResourceLoader/ResourceLoaderService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/FixtureInitializer/ObjectManagerNameInitializer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Options/ModuleOptions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
config/module.config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         'resourceLoader'     => [
38 38
             'fixtureName' => [
39 39
                 'name'    => 'resourceLoaderName',
40
-                'options' => []
40
+                'options' => [ ]
41 41
             ]
42 42
         ],
43 43
 
Please login to merge, or discard this patch.