Completed
Push — master ( d0e652...48ccfd )
by Андрей
9s
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/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/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.
src/Executor/Executor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      *
71 71
      * @var array
72 72
      */
73
-    protected $contextInitializer = [];
73
+    protected $contextInitializer = [ ];
74 74
 
75 75
     /**
76 76
      * Менеджер Initializer'ов
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      *
198 198
      * @return void
199 199
      */
200
-    public function import(array $contextData = [])
200
+    public function import(array $contextData = [ ])
201 201
     {
202 202
         $this->execute(FixtureExecutor::IMPORT, $contextData);
203 203
     }
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      *
211 211
      * @return void
212 212
      */
213
-    protected function execute($method, array $contextData = [])
213
+    protected function execute($method, array $contextData = [ ])
214 214
     {
215 215
         $loader = $this->getLoader();
216 216
         $filter = $this->getFilter();
@@ -218,15 +218,15 @@  discard block
 block discarded – undo
218 218
         $contextInitializer = $this->getContextInitializer();
219 219
         $fixtureInitializerManager = $this->getFixtureInitializerManager();
220 220
         $eventManager = $this->getConfiguration()->getEventManager();
221
-        $initializers = [];
221
+        $initializers = [ ];
222 222
         foreach ($contextInitializer as $initializerName) {
223 223
             $initializer = $fixtureInitializerManager->get($initializerName, $contextData);
224
-            $initializers[] = $initializer;
224
+            $initializers[ ] = $initializer;
225 225
             $eventManager->addEventSubscriber($initializer);
226 226
         }
227 227
 
228 228
         $resourceLoaderInitializer = $fixtureInitializerManager->get(ResourceLoaderInitializer::class);
229
-        $initializers[] = $resourceLoaderInitializer;
229
+        $initializers[ ] = $resourceLoaderInitializer;
230 230
         $eventManager->addEventSubscriber($resourceLoaderInitializer);
231 231
 
232 232
         $this->getFixtureExecutor()->execute($loader, $filter, $method);
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      *
243 243
      * @return void
244 244
      */
245
-    public function purge(array $contextData = [])
245
+    public function purge(array $contextData = [ ])
246 246
     {
247 247
         $this->execute(FixtureExecutor::PURGE, $contextData);
248 248
     }
Please login to merge, or discard this patch.
src/ResourceLoader/ResourceLoaderService.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      *
21 21
      * @var array
22 22
      */
23
-    protected $classFixtureToResourceLoader = [];
23
+    protected $classFixtureToResourceLoader = [ ];
24 24
 
25 25
     /**
26 26
      * Менеджер плагинов, отвечающиз за загрузку ресурсов для фикстур
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      *
57 57
      * @return $this
58 58
      */
59
-    public function setClassFixtureToResourceLoader(array $classFixtureToResourceLoader = [])
59
+    public function setClassFixtureToResourceLoader(array $classFixtureToResourceLoader = [ ])
60 60
     {
61 61
         $this->classFixtureToResourceLoader = $classFixtureToResourceLoader;
62 62
 
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
 
98 98
         $classFixtureToResourceLoader = $this->getClassFixtureToResourceLoader();
99 99
         if (array_key_exists($classFixture, $classFixtureToResourceLoader)) {
100
-            $fixtureResourceLoaderConfig = $this->buildFixtureResourceLoaderConfig($classFixtureToResourceLoader[$classFixture]);
101
-            $fixtureResourceLoader = $this->getResourceLoaderManager()->get($fixtureResourceLoaderConfig['name'], $fixtureResourceLoaderConfig['options']);
100
+            $fixtureResourceLoaderConfig = $this->buildFixtureResourceLoaderConfig($classFixtureToResourceLoader[ $classFixture ]);
101
+            $fixtureResourceLoader = $this->getResourceLoaderManager()->get($fixtureResourceLoaderConfig[ 'name' ], $fixtureResourceLoaderConfig[ 'options' ]);
102 102
             $fixtureResourceLoader->loadResourceForFixture($fixture);
103 103
         }
104 104
     }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function buildFixtureResourceLoaderConfig($fixtureResourceLoaderConfigData = null)
116 116
     {
117
-        $fixtureResourceLoaderConfig = [];
117
+        $fixtureResourceLoaderConfig = [ ];
118 118
 
119 119
         if (!is_array($fixtureResourceLoaderConfigData)) {
120 120
             $errMsg = 'Fixture resource loader config is not array';
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
             $errMsg = 'Resource loader name not defined';
126 126
             throw new Exception\InvalidFixtureResourceLoaderConfigException($errMsg);
127 127
         }
128
-        $fixtureResourceLoaderConfig['name'] = (string)$fixtureResourceLoaderConfigData['name'];
128
+        $fixtureResourceLoaderConfig[ 'name' ] = (string)$fixtureResourceLoaderConfigData[ 'name' ];
129 129
 
130
-        $fixtureResourceLoaderConfig['options'] = [];
130
+        $fixtureResourceLoaderConfig[ 'options' ] = [ ];
131 131
         if (array_key_exists('options', $fixtureResourceLoaderConfigData)) {
132
-            $fixtureResourceLoaderConfig['options'] = (array)$fixtureResourceLoaderConfigData['options'];
132
+            $fixtureResourceLoaderConfig[ 'options' ] = (array)$fixtureResourceLoaderConfigData[ 'options' ];
133 133
         }
134 134
 
135 135
         return $fixtureResourceLoaderConfig;
Please login to merge, or discard this patch.