mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-07 16:06:53 +00:00
Fix PHPStan errors
This commit is contained in:
@@ -423,7 +423,6 @@ final class CoreExtension extends AbstractExtension
|
||||
|
||||
if (!is_countable($values)) {
|
||||
throw new RuntimeError('The "cycle" function expects a countable sequence as first argument.');
|
||||
$values = self::toArray($values, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class ArrayExpression extends AbstractExpression implements SupportDefinedTestIn
|
||||
{
|
||||
foreach ($this->getKeyValuePairs() as $i => $pair) {
|
||||
$key = $pair['key'];
|
||||
if ($key instanceof TempNameExpression) {
|
||||
if ($key instanceof LocalVariable) {
|
||||
$keyValue = $key->getAttribute('name');
|
||||
} elseif ($key instanceof ConstantExpression) {
|
||||
$keyValue = $key->getAttribute('value');
|
||||
|
||||
Reference in New Issue
Block a user