|
@@ -63,8 +63,8 @@ discard block |
|
|
block discarded – undo |
|
63
|
63
|
|
|
64
|
64
|
// Allow substitutions rules to be defined with a leading a slash |
|
65
|
65
|
if (isset($rule['substitutions'])) { |
|
66
|
|
- foreach($rule['substitutions'] as $key => $value) { |
|
67
|
|
- $rule[ltrim($key, '\\')] = $value; |
|
|
66
|
+ foreach ($rule['substitutions'] as $key => $value) { |
|
|
67
|
+ $rule[ltrim($key, '\\')] = $value; |
|
68
|
68
|
} |
|
69
|
69
|
} |
|
70
|
70
|
$this->rules[self::normalizeName($classname)] = \array_replace_recursive($this->getRule($classname), $rule); |
|
@@ -171,7 +171,7 @@ discard block |
|
|
block discarded – undo |
|
171
|
171
|
//If there are shared instances, create them and merge them with shared instances higher up the object graph |
|
172
|
172
|
if (isset($rule['shareInstances'])) { |
|
173
|
173
|
$closure = function(array $args, array $share) use ($closure, $rule) { |
|
174
|
|
- foreach($rule['shareInstances'] as $instance) { |
|
|
174
|
+ foreach ($rule['shareInstances'] as $instance) { |
|
175
|
175
|
$share[] = $this->create($instance, [], $share); |
|
176
|
176
|
} |
|
177
|
177
|
return $closure($args, $share); |
Please login to merge, or discard this patch.