Set IteratorAggregate generics for Node

This will help PHPStan and Psalm to understand what happens when iterating over a Node.
This commit is contained in:
Ruud Kamphuis
2024-09-13 15:04:20 +02:00
committed by GitHub
parent 9ea43d8b60
commit ba6e856d92
+2
View File
@@ -20,6 +20,8 @@ use Twig\Source;
* Represents a node in the AST.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @implements \IteratorAggregate<int|string, Node>
*/
#[YieldReady]
class Node implements \Countable, \IteratorAggregate