Skip to content

Commit 2fe79e5

Browse files
committed
bug #4760 Fix PHPStan errors (fabpot)
This PR was merged into the 4.x branch. Discussion ---------- Fix PHPStan errors Commits ------- 058a381 Fix PHPStan errors
2 parents ec85153 + 058a381 commit 2fe79e5

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/Extension/CoreExtension.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ public static function cycle($values, $position): mixed
423423

424424
if (!is_countable($values)) {
425425
throw new RuntimeError('The "cycle" function expects a countable sequence as first argument.');
426-
$values = self::toArray($values, false);
427426
}
428427
}
429428

src/Node/Expression/ArrayExpression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function isSequence(): bool
7171
{
7272
foreach ($this->getKeyValuePairs() as $i => $pair) {
7373
$key = $pair['key'];
74-
if ($key instanceof TempNameExpression) {
74+
if ($key instanceof LocalVariable) {
7575
$keyValue = $key->getAttribute('name');
7676
} elseif ($key instanceof ConstantExpression) {
7777
$keyValue = $key->getAttribute('value');

0 commit comments

Comments
 (0)