mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 02:46:29 +00:00
fix constructor argument types
This commit is contained in:
@@ -22,7 +22,10 @@ use Twig\Node\Node;
|
|||||||
*/
|
*/
|
||||||
class BlockReferenceExpression extends AbstractExpression
|
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)) {
|
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);
|
@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;
|
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)]);
|
$body = new Node([$body, $this->loop = new ForLoopNode($lineno, $tag)]);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ use Twig\Compiler;
|
|||||||
*/
|
*/
|
||||||
class IfNode extends Node
|
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];
|
$nodes = ['tests' => $tests];
|
||||||
if (null !== $else) {
|
if (null !== $else) {
|
||||||
|
|||||||
Reference in New Issue
Block a user