diff --git a/src/Result.php b/src/Result.php index 6ac1626..ba3e796 100644 --- a/src/Result.php +++ b/src/Result.php @@ -5,6 +5,7 @@ use IteratorAggregate; use PhpParser\PrettyPrinter\Standard; use PhpParser\PrettyPrinterAbstract; +use Traversable; /** * Contains the results of stub generation, including the stubs themselves as @@ -33,7 +34,7 @@ public function __construct(NodeVisitor $visitor, array $unparsed) $this->unparsed = $unparsed; } - public function getIterator() + public function getIterator(): Traversable { return new ArrayIterator($this->getStubStmts()); }