Add more types to Template class and compiled templates

This commit is contained in:
Ruud Kamphuis
2024-08-29 20:21:36 +02:00
committed by Fabien Potencier
parent 22abdfafae
commit 7e52a68097
7 changed files with 30 additions and 26 deletions
+4 -1
View File
@@ -33,7 +33,10 @@ class BlockTest extends NodeTestCase
$tests = [];
$tests[] = [new BlockNode('foo', new TextNode('foo', 1), 1), <<<EOF
// line 1
public function block_foo(\$context, array \$blocks = [])
/**
* @return iterable<string>
*/
public function block_foo(array \$context, array \$blocks = []): iterable
{
\$macros = \$this->macros;
yield "foo";