Update src/Language/AST/NodeList.php

Co-Authored-By: Šimon Podlipský <simon@podlipsky.net>
This commit is contained in:
Benedikt Franke 2019-05-09 19:33:37 +02:00 committed by GitHub
parent e5b955ecc8
commit 019ed04a51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,7 +114,7 @@ class NodeList implements ArrayAccess, IteratorAggregate, Countable
*/ */
public function getIterator() public function getIterator()
{ {
foreach (array_keys($this->nodes) as $key) { foreach ($this->nodes as $key => $_) {
yield $this->offsetGet($key); yield $this->offsetGet($key);
} }
} }