@@ -197,7 +197,7 @@ |
||
197 | 197 | * @param mixed[][] $configuration Configuration arrays |
198 | 198 | * @param string|object $object Object or class name |
199 | 199 | * @param null|string|string[] $interfaces Array or string of interface names or class names |
200 | - * @return mixed[] Array of plugin configs |
|
200 | + * @return \Generator Array of plugin configs |
|
201 | 201 | * @yield mixed[] Array of plugin configs |
202 | 202 | */ |
203 | 203 | private function _getConfigs($configuration, $object, $interfaces = null) |
@@ -111,8 +111,7 @@ discard block |
||
111 | 111 | if (is_string($object)) |
112 | 112 | { |
113 | 113 | $key = $object; |
114 | - } |
|
115 | - else |
|
114 | + } else |
|
116 | 115 | { |
117 | 116 | $key = get_class($object); |
118 | 117 | } |
@@ -242,13 +241,11 @@ discard block |
||
242 | 241 | if (isset($this->plugins[$key])) |
243 | 242 | { |
244 | 243 | $plugin = $this->plugins[$key]; |
245 | - } |
|
246 | - else |
|
244 | + } else |
|
247 | 245 | { |
248 | 246 | $plugin = $this->plugins[$key] = new $className; |
249 | 247 | } |
250 | - } |
|
251 | - else |
|
248 | + } else |
|
252 | 249 | { |
253 | 250 | $plugin = new $className; |
254 | 251 | } |
@@ -271,8 +268,7 @@ discard block |
||
271 | 268 | |
272 | 269 | // Complex config |
273 | 270 | return md5(json_encode($config)); |
274 | - } |
|
275 | - else |
|
271 | + } else |
|
276 | 272 | { |
277 | 273 | return $config; |
278 | 274 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function apply($config) |
55 | 55 | { |
56 | - foreach ((array)$config as $name => $value) |
|
56 | + foreach ((array) $config as $name => $value) |
|
57 | 57 | { |
58 | 58 | $this->offsetSet($name, $value); |
59 | 59 | } |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | { |
135 | 135 | throw new GazeboException("Class `$name` used as key does not exists. Tried to set value."); |
136 | 136 | } |
137 | - foreach($value as $cfg) |
|
137 | + foreach ($value as $cfg) |
|
138 | 138 | { |
139 | - if(is_array($cfg)) |
|
139 | + if (is_array($cfg)) |
|
140 | 140 | { |
141 | 141 | $className = $cfg[$this->_di->classField]; |
142 | 142 | } |
@@ -139,8 +139,7 @@ |
||
139 | 139 | if(is_array($cfg)) |
140 | 140 | { |
141 | 141 | $className = $cfg[$this->_di->classField]; |
142 | - } |
|
143 | - else |
|
142 | + } else |
|
144 | 143 | { |
145 | 144 | $className = $cfg; |
146 | 145 | } |