@@ -31,7 +31,7 @@ |
||
31 | 31 | public function attach(EventManagerInterface $events) |
32 | 32 | { |
33 | 33 | if (is_callable($this->overrideAppConfigHandler)) { |
34 | - $this->listeners[] = $events->attach(ModuleEvent::EVENT_LOAD_MODULES_POST, $this->overrideAppConfigHandler); |
|
34 | + $this->listeners[ ] = $events->attach(ModuleEvent::EVENT_LOAD_MODULES_POST, $this->overrideAppConfigHandler); |
|
35 | 35 | } |
36 | 36 | parent::attach($events); |
37 | 37 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * |
30 | 30 | * @var array |
31 | 31 | */ |
32 | - protected $overrideConfigs = []; |
|
32 | + protected $overrideConfigs = [ ]; |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Устанавливает конфиг приолжения |
@@ -55,15 +55,15 @@ discard block |
||
55 | 55 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
56 | 56 | * @throws \Zend\ServiceManager\Exception\InvalidServiceNameException |
57 | 57 | */ |
58 | - public function overrideAppConfig(array $newConfig = []) |
|
58 | + public function overrideAppConfig(array $newConfig = [ ]) |
|
59 | 59 | { |
60 | 60 | $applicationConfig = $this->getApplicationConfig(); |
61 | 61 | |
62 | - if (is_array($applicationConfig) && !isset($applicationConfig['service_manager']['factories']['ServiceListenerInterface'])) { |
|
62 | + if (is_array($applicationConfig) && !isset($applicationConfig[ 'service_manager' ][ 'factories' ][ 'ServiceListenerInterface' ])) { |
|
63 | 63 | $appConfig = ArrayUtils::merge($applicationConfig, [ |
64 | 64 | 'service_manager' => [ |
65 | 65 | 'factories' => [ |
66 | - 'ServiceListenerInterface' => [$this, 'serviceListenerInterfaceFactory'], |
|
66 | + 'ServiceListenerInterface' => [ $this, 'serviceListenerInterfaceFactory' ], |
|
67 | 67 | ] |
68 | 68 | ] |
69 | 69 | ]); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | $this->serviceListenerForTest = new ServiceListenerForTest($sm); |
92 | - $this->serviceListenerForTest->setOverrideAppConfigHandler([$this, 'overrideAppConfigHandler']); |
|
92 | + $this->serviceListenerForTest->setOverrideAppConfigHandler([ $this, 'overrideAppConfigHandler' ]); |
|
93 | 93 | |
94 | 94 | return $this->serviceListenerForTest; |
95 | 95 | } |
@@ -101,9 +101,9 @@ discard block |
||
101 | 101 | * |
102 | 102 | * @return $this |
103 | 103 | */ |
104 | - protected function addOverrideConfig(array $overrideConfigs = []) |
|
104 | + protected function addOverrideConfig(array $overrideConfigs = [ ]) |
|
105 | 105 | { |
106 | - $this->overrideConfigs[] = $overrideConfigs; |
|
106 | + $this->overrideConfigs[ ] = $overrideConfigs; |
|
107 | 107 | |
108 | 108 | return $this; |
109 | 109 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | public function overrideAppConfigHandler(ModuleEvent $e) |
128 | 128 | { |
129 | 129 | $configListener = $e->getConfigListener(); |
130 | - $baseAppConfig = $configListener->getMergedConfig(false); |
|
130 | + $baseAppConfig = $configListener->getMergedConfig(false); |
|
131 | 131 | |
132 | 132 | $overrideConfigs = $this->getOverrideConfigs(); |
133 | 133 | foreach ($overrideConfigs as $overrideConfig) { |