File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -135,20 +135,17 @@ public function merge(mixed $value, mixed $base): mixed
135135 if ($ key === $ index ) {
136136 $ base [] = $ val ;
137137 $ index ++;
138- } elseif (array_key_exists ($ key , $ base )) {
139- $ itemSchema = $ this ->items [$ key ] ?? $ this ->otherItems ;
140- $ base [$ key ] = $ itemSchema
141- ? $ itemSchema ->merge ($ val , $ base [$ key ])
142- : Helpers::merge ($ val , $ base [$ key ]);
143138 } else {
144- $ base [$ key ] = $ val ;
139+ $ base [$ key ] = array_key_exists ($ key , $ base ) && ($ itemSchema = $ this ->items [$ key ] ?? $ this ->otherItems )
140+ ? $ itemSchema ->merge ($ val , $ base [$ key ])
141+ : $ val ;
145142 }
146143 }
147144
148145 return $ base ;
149146 }
150147
151- return Helpers:: merge ( $ value, $ base) ;
148+ return $ value ?? $ base ;
152149 }
153150
154151
You can’t perform that action at this time.
0 commit comments