Skip to content

CS: clean some whitespaces/indentation #58472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ public function enterNode(Node $node, Environment $env): Node
$name = new AssignNameExpression(self::INTERNAL_VAR_NAME, $node->getTemplateLine());
$this->scope->set('domain', new NameExpression(self::INTERNAL_VAR_NAME, $node->getTemplateLine()));


if (class_exists(Nodes::class)) {
return new SetNode(false, new Nodes([$name]), new Nodes([$node->getNode('expr')]), $node->getTemplateLine());
}
}

return new SetNode(false, new Node([$name]), new Node([$node->getNode('expr')]), $node->getTemplateLine());
}
Expand Down
66 changes: 33 additions & 33 deletions src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public function testCompileWidgetWithVariables()
if (class_exists(Nodes::class)) {
$arguments = new Nodes([
new NameExpression('form', 0),
new ArrayExpression([
new ConstantExpression('foo', 0),
new ConstantExpression('bar', 0),
new ArrayExpression([
new ConstantExpression('foo', 0),
new ConstantExpression('bar', 0),
], 0),
]);
} else {
Expand Down Expand Up @@ -201,9 +201,9 @@ public function testCompileLabelWithAttributes()
$arguments = new Nodes([
new NameExpression('form', 0),
new ConstantExpression(null, 0),
new ArrayExpression([
new ConstantExpression('foo', 0),
new ConstantExpression('bar', 0),
new ArrayExpression([
new ConstantExpression('foo', 0),
new ConstantExpression('bar', 0),
], 0),
]);
} else {
Expand Down Expand Up @@ -239,11 +239,11 @@ public function testCompileLabelWithLabelAndAttributes()
$arguments = new Nodes([
new NameExpression('form', 0),
new ConstantExpression('value in argument', 0),
new ArrayExpression([
new ConstantExpression('foo', 0),
new ConstantExpression('bar', 0),
new ConstantExpression('label', 0),
new ConstantExpression('value in attributes', 0),
new ArrayExpression([
new ConstantExpression('foo', 0),
new ConstantExpression('bar', 0),
new ConstantExpression('label', 0),
new ConstantExpression('value in attributes', 0),
], 0),
]);
} else {
Expand Down Expand Up @@ -277,14 +277,14 @@ public function testCompileLabelWithLabelThatEvaluatesToNull()
if (class_exists(Nodes::class)) {
$arguments = new Nodes([
new NameExpression('form', 0),
new ConditionalExpression(
// if
new ConstantExpression(true, 0),
// then
new ConstantExpression(null, 0),
// else
new ConstantExpression(null, 0),
0
new ConditionalExpression(
// if
new ConstantExpression(true, 0),
// then
new ConstantExpression(null, 0),
// else
new ConstantExpression(null, 0),
0
),
]);
} else {
Expand Down Expand Up @@ -324,20 +324,20 @@ public function testCompileLabelWithLabelThatEvaluatesToNullAndAttributes()
if (class_exists(Nodes::class)) {
$arguments = new Nodes([
new NameExpression('form', 0),
new ConditionalExpression(
// if
new ConstantExpression(true, 0),
// then
new ConstantExpression(null, 0),
// else
new ConstantExpression(null, 0),
0
),
new ArrayExpression([
new ConstantExpression('foo', 0),
new ConstantExpression('bar', 0),
new ConstantExpression('label', 0),
new ConstantExpression('value in attributes', 0),
new ConditionalExpression(
// if
new ConstantExpression(true, 0),
// then
new ConstantExpression(null, 0),
// else
new ConstantExpression(null, 0),
0
),
new ArrayExpression([
new ConstantExpression('foo', 0),
new ConstantExpression('bar', 0),
new ConstantExpression('label', 0),
new ConstantExpression('value in attributes', 0),
], 0),
]);
} else {
Expand Down
Loading