mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-10 09:26:29 +00:00
fix constructor argument types
This commit is contained in:
@@ -22,7 +22,10 @@ use Twig\Node\Node;
|
||||
*/
|
||||
class BlockReferenceExpression extends AbstractExpression
|
||||
{
|
||||
public function __construct(\Twig_NodeInterface $name, ?Node $template, $lineno, $tag = null)
|
||||
/**
|
||||
* @param Node|null $template
|
||||
*/
|
||||
public function __construct(\Twig_NodeInterface $name, $template, $lineno, $tag = null)
|
||||
{
|
||||
if (\is_bool($template)) {
|
||||
@trigger_error(sprintf('The %s method "$asString" argument is deprecated since version 1.28 and will be removed in 2.0.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
@@ -25,7 +25,7 @@ class ForNode extends Node
|
||||
{
|
||||
protected $loop;
|
||||
|
||||
public function __construct(AssignNameExpression $keyTarget, AssignNameExpression $valueTarget, AbstractExpression $seq, ?AbstractExpression $ifexpr, ?\Twig_NodeInterface $body, ?\Twig_NodeInterface $else, $lineno, $tag = null)
|
||||
public function __construct(AssignNameExpression $keyTarget, AssignNameExpression $valueTarget, AbstractExpression $seq, ?AbstractExpression $ifexpr, \Twig_NodeInterface $body, ?\Twig_NodeInterface $else, $lineno, $tag = null)
|
||||
{
|
||||
$body = new Node([$body, $this->loop = new ForLoopNode($lineno, $tag)]);
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ use Twig\Compiler;
|
||||
*/
|
||||
class IfNode extends Node
|
||||
{
|
||||
public function __construct(?\Twig_NodeInterface $tests, ?\Twig_NodeInterface $else, $lineno, $tag = null)
|
||||
public function __construct(\Twig_NodeInterface $tests, ?\Twig_NodeInterface $else, $lineno, $tag = null)
|
||||
{
|
||||
$nodes = ['tests' => $tests];
|
||||
if (null !== $else) {
|
||||
|
||||
Reference in New Issue
Block a user