From 019ed04a5160aa20b92b96ea83502ae794458976 Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Thu, 9 May 2019 19:33:37 +0200 Subject: [PATCH] Update src/Language/AST/NodeList.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Šimon Podlipský --- src/Language/AST/NodeList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Language/AST/NodeList.php b/src/Language/AST/NodeList.php index c91fbcf..648f68a 100644 --- a/src/Language/AST/NodeList.php +++ b/src/Language/AST/NodeList.php @@ -114,7 +114,7 @@ class NodeList implements ArrayAccess, IteratorAggregate, Countable */ public function getIterator() { - foreach (array_keys($this->nodes) as $key) { + foreach ($this->nodes as $key => $_) { yield $this->offsetGet($key); } }