Completed
Push — master ( 7d671f...0ed9ba )
by Андрей
04:24 queued 02:24
created
config/module.config.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @link    https://github.com/nnx-framework/module
4
- * @author  Malofeykin Andrey  <[email protected]>
5
- */
3
+     * @link    https://github.com/nnx-framework/module
4
+     * @author  Malofeykin Andrey  <[email protected]>
5
+     */
6 6
 namespace Nnx\Module;
7 7
 
8 8
 $config = [
Please login to merge, or discard this patch.
src/Exception/ExceptionInterface.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @link    https://github.com/nnx-framework/module
4
- * @author  Malofeykin Andrey  <[email protected]>
5
- */
3
+     * @link    https://github.com/nnx-framework/module
4
+     * @author  Malofeykin Andrey  <[email protected]>
5
+     */
6 6
 namespace Nnx\Module;
7 7
 
8 8
 $config = [
Please login to merge, or discard this patch.
src/Listener/IntegrationModuleListener.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     /**
105 105
      * Возвращает для итеграционного модуля список настроек, которые должны быть применены, ко всем модулям сервиса
106 106
      *
107
-     * @param mixed                 $integrationModule
107
+     * @param IntegrationModuleInterface                 $integrationModule
108 108
      * @param ConfigMergerInterface $configListener
109 109
      *
110 110
      * @return array
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     /**
207 207
      * Добавляет в стек, содержащий объекты событий бросаемых при иницилацзия интеграционного модуля.
208 208
      *
209
-     * @param $initIntegrationModuleEvent $stackInitIntegrationModuleEvent
209
+     * @param $initIntegrationModuleEvent $initIntegrationModuleEvent
210 210
      *
211 211
      * @return $this
212 212
      */
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @var IntegrationModuleEventInterface[]
32 32
      */
33
-    protected $stackInitIntegrationModuleEvent = [];
33
+    protected $stackInitIntegrationModuleEvent = [ ];
34 34
 
35 35
     /**
36 36
      * Идендфикаторы подписчиков на SharedManagerEvent
37 37
      *
38 38
      * @var array
39 39
      */
40
-    protected $sharedListeners = [];
40
+    protected $sharedListeners = [ ];
41 41
 
42 42
     /**
43 43
      * Приоритет обработчки отвечающего за конфигурирование модулей сервиса. Для корректной работы
@@ -61,16 +61,16 @@  discard block
 block discarded – undo
61 61
         $integrationModuleEventHandler = $sharedEventManager->attach(
62 62
             IntegrationModuleInterface::class,
63 63
             IntegrationModuleEventInterface::INIT_INTEGRATION_MODULE_EVENT,
64
-            [$this, 'initIntegrationModuleEventHandler']
64
+            [ $this, 'initIntegrationModuleEventHandler' ]
65 65
         );
66
-        $this->sharedListeners[] = [
66
+        $this->sharedListeners[ ] = [
67 67
             'listener' => $integrationModuleEventHandler,
68 68
             'id' => IntegrationModuleInterface::class
69 69
         ];
70 70
 
71
-        $this->listeners[] = $events->attach(
71
+        $this->listeners[ ] = $events->attach(
72 72
             ModuleEvent::EVENT_LOAD_MODULES_POST,
73
-            [$this, 'configuringServiceModulesHandler'],
73
+            [ $this, 'configuringServiceModulesHandler' ],
74 74
             $this->configuringServiceModulesHandlerPriority
75 75
         );
76 76
     }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function getCommonModuleOptionsByIntegrationModule($integrationModule, ConfigMergerInterface $configListener)
113 113
     {
114
-        $commonModuleOptions = [];
114
+        $commonModuleOptions = [ ];
115 115
         if (!$integrationModule instanceof CommonModuleOptionsInterface) {
116 116
             return $commonModuleOptions;
117 117
         }
@@ -129,10 +129,10 @@  discard block
 block discarded – undo
129 129
             return $commonModuleOptions;
130 130
         }
131 131
 
132
-        $integrationModuleConfig = array_key_exists($integrationModuleConfigKey, $appConfig) ? $appConfig[$integrationModuleConfigKey] : [];
132
+        $integrationModuleConfig = array_key_exists($integrationModuleConfigKey, $appConfig) ? $appConfig[ $integrationModuleConfigKey ] : [ ];
133 133
 
134 134
         foreach ($listCommonModuleOptions as $key) {
135
-            $commonModuleOptions[$key] = array_key_exists($key, $integrationModuleConfig) ? $integrationModuleConfig[$key] : null;
135
+            $commonModuleOptions[ $key ] = array_key_exists($key, $integrationModuleConfig) ? $integrationModuleConfig[ $key ] : null;
136 136
         }
137 137
 
138 138
         return $commonModuleOptions;
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             if (!array_key_exists($moduleName, $loadedModules)) {
162 162
                 continue;
163 163
             }
164
-            $module = $loadedModules[$moduleName];
164
+            $module = $loadedModules[ $moduleName ];
165 165
 
166 166
             if (!$module instanceof ModuleConfigKeyProviderInterface) {
167 167
                 continue;
@@ -169,11 +169,11 @@  discard block
 block discarded – undo
169 169
 
170 170
             $moduleConfigKey = $module->getModuleConfigKey();
171 171
 
172
-            $moduleConfig = array_key_exists($moduleConfigKey, $appConfig) ? $appConfig[$moduleConfigKey] : [];
172
+            $moduleConfig = array_key_exists($moduleConfigKey, $appConfig) ? $appConfig[ $moduleConfigKey ] : [ ];
173 173
 
174 174
             $newModuleConfig = ArrayUtils::merge($moduleConfig, $commonModuleOptions);
175 175
 
176
-            $appConfig[$moduleConfigKey] = $newModuleConfig;
176
+            $appConfig[ $moduleConfigKey ] = $newModuleConfig;
177 177
         }
178 178
 
179 179
         $configListener->setMergedConfig($appConfig);
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
         parent::detach($events);
188 188
         $sharedEventManager = $events->getSharedManager();
189 189
         foreach ($this->sharedListeners as $index => $item) {
190
-            if ($sharedEventManager->detach($item['id'], $item['listener'])) {
191
-                unset($this->sharedListeners[$index]);
190
+            if ($sharedEventManager->detach($item[ 'id' ], $item[ 'listener' ])) {
191
+                unset($this->sharedListeners[ $index ]);
192 192
             }
193 193
         }
194 194
     }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public function addInitIntegrationModuleEventInStack(IntegrationModuleEventInterface $initIntegrationModuleEvent)
214 214
     {
215
-        $this->stackInitIntegrationModuleEvent[] = $initIntegrationModuleEvent;
215
+        $this->stackInitIntegrationModuleEvent[ ] = $initIntegrationModuleEvent;
216 216
 
217 217
         return $this;
218 218
     }
Please login to merge, or discard this patch.
Module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         $integrationModuleListener = null;
49 49
 
50 50
         if ($manager instanceof ModuleManager) {
51
-            $event =  $manager->getEvent();
51
+            $event = $manager->getEvent();
52 52
             if ($event instanceof EventInterface) {
53 53
                 $sl = $event->getParam('ServiceManager');
54 54
                 if ($sl instanceof ServiceLocatorInterface && $sl->has(IntegrationModuleListenerInterface::class)) {
Please login to merge, or discard this patch.
src/Exception/ErrorCreateIntegrationModuleEventException.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @link    https://github.com/nnx-framework/module
4
- * @author  Malofeykin Andrey  <[email protected]>
5
- */
3
+     * @link    https://github.com/nnx-framework/module
4
+     * @author  Malofeykin Andrey  <[email protected]>
5
+     */
6 6
 namespace Nnx\Module;
7 7
 
8 8
 $config = [
Please login to merge, or discard this patch.
src/Event/Exception/InvalidModuleManagerException.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @link    https://github.com/nnx-framework/module
4
- * @author  Malofeykin Andrey  <[email protected]>
5
- */
3
+     * @link    https://github.com/nnx-framework/module
4
+     * @author  Malofeykin Andrey  <[email protected]>
5
+     */
6 6
 namespace Nnx\Module;
7 7
 
8 8
 $config = [
Please login to merge, or discard this patch.
src/Event/Exception/ExceptionInterface.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @link    https://github.com/nnx-framework/module
4
- * @author  Malofeykin Andrey  <[email protected]>
5
- */
3
+     * @link    https://github.com/nnx-framework/module
4
+     * @author  Malofeykin Andrey  <[email protected]>
5
+     */
6 6
 namespace Nnx\Module;
7 7
 
8 8
 $config = [
Please login to merge, or discard this patch.
src/IntegrationModuleTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
 
94 94
         $manager->getEventManager()->attach(
95 95
             ModuleEvent::EVENT_LOAD_MODULES_POST,
96
-            [$this, 'onLoadModulesPostProxyHandler'],
96
+            [ $this, 'onLoadModulesPostProxyHandler' ],
97 97
             $this->loadModulesPostProxyHandlerPriority
98 98
         );
99 99
     }
Please login to merge, or discard this patch.
src/Listener/IntegrationModuleListenerInterface.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @link    https://github.com/nnx-framework/module
4
- * @author  Malofeykin Andrey  <[email protected]>
5
- */
3
+     * @link    https://github.com/nnx-framework/module
4
+     * @author  Malofeykin Andrey  <[email protected]>
5
+     */
6 6
 namespace Nnx\Module;
7 7
 
8 8
 $config = [
Please login to merge, or discard this patch.