diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index e8ecda46f..ee79668b7 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -191,9 +191,6 @@
-
- \AllowDynamicProperties
-
keyword]]]>
keyword]]]>
@@ -236,6 +233,9 @@
+
+ \AllowDynamicProperties
+
@@ -255,9 +255,6 @@
$expr
$expr
-
- is_array($ret)
-
@@ -4917,9 +4914,6 @@
$built[$field]
value]]]>
-
- \AllowDynamicProperties
-
__toString
@@ -4955,6 +4949,9 @@
count($clauses) === 0
+
+ \AllowDynamicProperties
+
$index
diff --git a/src/Components/ExpressionArray.php b/src/Components/ExpressionArray.php
index c206a4226..cf3422730 100644
--- a/src/Components/ExpressionArray.php
+++ b/src/Components/ExpressionArray.php
@@ -12,7 +12,6 @@
use function count;
use function implode;
-use function is_array;
use function preg_match;
use function strlen;
use function substr;
@@ -105,15 +104,12 @@ public static function parse(Parser $parser, TokensList $list, array $options =
}
--$list->idx;
-
- if (is_array($ret)) {
- $retIndex = count($ret) - 1;
- if (isset($ret[$retIndex])) {
- $expr = $ret[$retIndex]->expr;
- if (preg_match('/\s*--\s.*$/', $expr, $matches)) {
- $found = $matches[0];
- $ret[$retIndex]->expr = substr($expr, 0, strlen($expr) - strlen($found));
- }
+ $retIndex = count($ret) - 1;
+ if (isset($ret[$retIndex])) {
+ $expr = $ret[$retIndex]->expr;
+ if (preg_match('/\s*--\s.*$/', $expr, $matches)) {
+ $found = $matches[0];
+ $ret[$retIndex]->expr = substr($expr, 0, strlen($expr) - strlen($found));
}
}