File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
lib/internal/Magento/Framework/ObjectManager/Config Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -129,20 +129,15 @@ public function getPreference($type)
129
129
*/
130
130
public function extend (array $ configuration )
131
131
{
132
- $ properties = [
133
- 'arguments ' => 'arguments ' ,
134
- 'instanceTypes ' => 'virtualTypes ' ,
135
- 'preferences ' => 'preferences '
136
- ];
137
-
138
- foreach ($ configuration as $ key => $ config ) {
139
- if (empty ($ properties [$ key ])) {
140
- continue ;
141
- }
142
-
143
- $ property = $ properties [$ key ];
144
- $ this ->$ property = array_replace ($ this ->$ property , $ config );
145
- }
132
+ $ this ->arguments = isset ($ configuration ['arguments ' ])
133
+ ? array_replace ($ this ->arguments , $ configuration ['arguments ' ])
134
+ : $ this ->arguments ;
135
+ $ this ->virtualTypes = isset ($ configuration ['instanceTypes ' ])
136
+ ? array_replace ($ this ->virtualTypes , $ configuration ['instanceTypes ' ])
137
+ : $ this ->virtualTypes ;
138
+ $ this ->preferences = isset ($ configuration ['preferences ' ])
139
+ ? array_replace ($ this ->preferences , $ configuration ['preferences ' ])
140
+ : $ this ->preferences ;
146
141
}
147
142
148
143
/**
You can’t perform that action at this time.
0 commit comments