Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Aug 27, 2024
1 parent 7e7808d commit 41459e0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Node/MacroNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MacroNode extends Node
public function __construct(string $name, Node $body, Node $arguments, int $lineno, ?string $tag = null)
{
if (!$body instanceof BodyNode) {
trigger_deprecation('twig/twig', '3.12', sprintf('Not passing a "%s" instance as the "body" argument of the "%s" constructor is deprecated.', BodyNode::class, static::class));
trigger_deprecation('twig/twig', '3.12', \sprintf('Not passing a "%s" instance as the "body" argument of the "%s" constructor is deprecated.', BodyNode::class, static::class));
}

foreach ($arguments as $argumentName => $argument) {
Expand Down
2 changes: 1 addition & 1 deletion src/Node/ModuleNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ final class ModuleNode extends Node
public function __construct(Node $body, ?AbstractExpression $parent, Node $blocks, Node $macros, Node $traits, $embeddedTemplates, Source $source)
{
if (!$body instanceof BodyNode) {
trigger_deprecation('twig/twig', '3.12', sprintf('Not passing a "%s" instance as the "body" argument of the "%s" constructor is deprecated.', BodyNode::class, static::class));
trigger_deprecation('twig/twig', '3.12', \sprintf('Not passing a "%s" instance as the "body" argument of the "%s" constructor is deprecated.', BodyNode::class, static::class));
}

$nodes = [
Expand Down
2 changes: 1 addition & 1 deletion src/Node/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function __toString()
}

if (\count($this->nodes)) {
$repr .= \sprintf("\n nodes:");
$repr .= "\n nodes:";
foreach ($this->nodes as $name => $node) {
$len = \strlen($name) + 6;
$noderepr = [];
Expand Down
4 changes: 2 additions & 2 deletions tests/Node/NodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function: Twig\TwigFunction(a_function)
filter: Twig\TwigFilter(a_filter)
test: Twig\TwigTest(a_test)
EOF
, (string) $node);
, (string) $node);
}

public function testToStringWithTag()
Expand All @@ -63,7 +63,7 @@ public function testToStringWithTag()
Twig\Node\Node
tag: tag
EOF
, (string) $node);
, (string) $node);
}

public function testAttributeDeprecationIgnore()
Expand Down

0 comments on commit 41459e0

Please sign in to comment.