Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8851bd2

Browse filesBrowse files
committed
[Messenger] Messenger options were merged with numbers as keys.
Avoid double negation
1 parent 004abd4 commit 8851bd2
Copy full SHA for 8851bd2

File tree

1 file changed

+4
-4
lines changed
Filter options

1 file changed

+4
-4
lines changed

‎src/Symfony/Component/Config/Definition/PrototypedArrayNode.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Definition/PrototypedArrayNode.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@ protected function normalizeValue($value)
225225

226226
$value = $this->remapXml($value);
227227

228-
$isAssoc = !array_is_list($value);
228+
$isList = array_is_list($value);
229229
$normalized = [];
230230
foreach ($value as $k => $v) {
231231
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) {
233233
$ex = new InvalidConfigurationException(sprintf('The attribute "%s" must be set for path "%s".', $this->keyAttribute, $this->getPath()));
234234
$ex->setPath($this->getPath());
235235

@@ -304,10 +304,10 @@ protected function mergeValues($leftSide, $rightSide)
304304
return $rightSide;
305305
}
306306

307-
$isAssoc = !array_is_list($rightSide);
307+
$isList = array_is_list($rightSide);
308308
foreach ($rightSide as $k => $v) {
309309
// 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) {
311311
$leftSide[] = $v;
312312
continue;
313313
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.