@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | public function __construct() { |
25 | 25 | $this->rules = ['*' => ['inherit' => true, 'constructorArgs' => []]]; |
26 | - $this->currentRule =& $this->rules['*']; |
|
26 | + $this->currentRule = & $this->rules['*']; |
|
27 | 27 | $this->instances = []; |
28 | 28 | $this->factories = []; |
29 | 29 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * @return $this |
45 | 45 | */ |
46 | 46 | public function defaultRule() { |
47 | - $this->currentRule =& $this->rules['*']; |
|
47 | + $this->currentRule = & $this->rules['*']; |
|
48 | 48 | return $this; |
49 | 49 | } |
50 | 50 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | if (!isset($this->rules[$id])) { |
61 | 61 | $this->rules[$id] = []; |
62 | 62 | } |
63 | - $this->currentRule =& $this->rules[$id]; |
|
63 | + $this->currentRule = & $this->rules[$id]; |
|
64 | 64 | return $this; |
65 | 65 | } |
66 | 66 | |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | $interfaces = class_implements($nid); |
192 | 192 | foreach ($interfaces as $interface) { |
193 | 193 | if (!empty($this->rules[$interface]['calls']) |
194 | - && (!isset($this->rules[$interface]['inherit'])|| $this->rules[$interface]['inherit'] !== false)) { |
|
194 | + && (!isset($this->rules[$interface]['inherit']) || $this->rules[$interface]['inherit'] !== false)) { |
|
195 | 195 | |
196 | 196 | $rule['calls'] = array_merge( |
197 | 197 | isset($rule['calls']) ? $rule['calls'] : [], |
@@ -226,11 +226,11 @@ discard block |
||
226 | 226 | if ($constructor && $constructor->getNumberOfParameters() > 0) { |
227 | 227 | $constructorArgs = $this->makeDefaultArgs($constructor, $rule['constructorArgs'], $rule); |
228 | 228 | |
229 | - $factory = function ($args) use ($class, $constructorArgs) { |
|
229 | + $factory = function($args) use ($class, $constructorArgs) { |
|
230 | 230 | return $class->newInstanceArgs($this->resolveArgs($constructorArgs, $args)); |
231 | 231 | }; |
232 | 232 | } else { |
233 | - $factory = function () use ($className) { |
|
233 | + $factory = function() use ($className) { |
|
234 | 234 | return new $className; |
235 | 235 | }; |
236 | 236 | } |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | } |
248 | 248 | |
249 | 249 | // Wrap the factory in one that makes the calls. |
250 | - $factory = function ($args) use ($factory, $calls) { |
|
250 | + $factory = function($args) use ($factory, $calls) { |
|
251 | 251 | $instance = $factory($args); |
252 | 252 | |
253 | 253 | foreach ($calls as $call) { |