File tree 1 file changed +4
-4
lines changed
Filter options
src/Symfony/Component/Config/Definition 1 file changed +4
-4
lines changed
Original file line number Diff line number Diff line change @@ -225,11 +225,11 @@ protected function normalizeValue($value)
225
225
226
226
$ value = $ this ->remapXml ($ value );
227
227
228
- $ isAssoc = ! array_is_list ($ value );
228
+ $ isList = array_is_list ($ value );
229
229
$ normalized = [];
230
230
foreach ($ value as $ k => $ v ) {
231
231
if (null !== $ this ->keyAttribute && \is_array ($ v )) {
232
- if (!isset ($ v [$ this ->keyAttribute ]) && \is_int ($ k ) && ! $ isAssoc ) {
232
+ if (!isset ($ v [$ this ->keyAttribute ]) && \is_int ($ k ) && $ isList ) {
233
233
$ ex = new InvalidConfigurationException (sprintf ('The attribute "%s" must be set for path "%s". ' , $ this ->keyAttribute , $ this ->getPath ()));
234
234
$ ex ->setPath ($ this ->getPath ());
235
235
@@ -304,10 +304,10 @@ protected function mergeValues($leftSide, $rightSide)
304
304
return $ rightSide ;
305
305
}
306
306
307
- $ isAssoc = ! array_is_list ($ rightSide );
307
+ $ isList = array_is_list ($ rightSide );
308
308
foreach ($ rightSide as $ k => $ v ) {
309
309
// prototype, and key is irrelevant there are no named keys, append the element
310
- if (null === $ this ->keyAttribute && ! $ isAssoc ) {
310
+ if (null === $ this ->keyAttribute && $ isList ) {
311
311
$ leftSide [] = $ v ;
312
312
continue ;
313
313
}
You can’t perform that action at this time.
0 commit comments