mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-11 22:35:46 +00:00
Fix iterable return type
Currently, the PHPDoc states that a string should be returned, but that's not correct. It can be anything that is echo-able. That means any scalar, Stringable and even null.
This commit is contained in:
@@ -33,7 +33,7 @@ class BlockNode extends Node
|
||||
$compiler
|
||||
->addDebugInfo($this)
|
||||
->write("/**\n")
|
||||
->write(" * @return iterable<string>\n")
|
||||
->write(" * @return iterable<null|scalar|\Stringable>\n")
|
||||
->write(" */\n")
|
||||
->write(\sprintf("public function block_%s(array \$context, array \$blocks = []): iterable\n", $this->getAttribute('name')), "{\n")
|
||||
->indent()
|
||||
|
||||
Reference in New Issue
Block a user