Skip to content

Commit a2fa4d0

Browse files
committed
Remove unused local variables in tests
1 parent d8115c5 commit a2fa4d0

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

Node/SearchAndRenderBlockNode.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public function compile(Compiler $compiler)
2828

2929
preg_match('/_([^_]+)$/', $this->getAttribute('name'), $matches);
3030

31-
$label = null;
3231
$arguments = iterator_to_array($this->getNode('arguments'));
3332
$blockNameSuffix = $matches[1];
3433

Tests/AppVariableTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ public function testGetFlashes()
180180
$flashMessages = $this->setFlashMessages();
181181
$this->assertEquals($flashMessages, $this->appVariable->getFlashes([]));
182182

183-
$flashMessages = $this->setFlashMessages();
183+
$this->setFlashMessages();
184184
$this->assertEquals([], $this->appVariable->getFlashes('this-does-not-exist'));
185185

186-
$flashMessages = $this->setFlashMessages();
186+
$this->setFlashMessages();
187187
$this->assertEquals(
188188
['this-does-not-exist' => []],
189189
$this->appVariable->getFlashes(['this-does-not-exist'])

Tests/Command/LintCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testLintFileNotReadable()
5252
$filename = $this->createFile('');
5353
unlink($filename);
5454

55-
$ret = $tester->execute(['filename' => [$filename]], ['decorated' => false]);
55+
$tester->execute(['filename' => [$filename]], ['decorated' => false]);
5656
}
5757

5858
public function testLintFileCompileTimeException()

Tests/Extension/StopwatchExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testTiming($template, $events)
3434
$twig->addExtension(new StopwatchExtension($this->getStopwatch($events)));
3535

3636
try {
37-
$nodes = $twig->render('template');
37+
$twig->render('template');
3838
} catch (RuntimeError $e) {
3939
throw $e->getPrevious();
4040
}

Tests/Extension/TranslationExtensionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ public function testTransUnknownKeyword()
4949
{
5050
$this->expectException('Twig\Error\SyntaxError');
5151
$this->expectExceptionMessage('Unexpected token. Twig was looking for the "with", "from", or "into" keyword in "index" at line 3.');
52-
$output = $this->getTemplate("{% trans \n\nfoo %}{% endtrans %}")->render();
52+
$this->getTemplate("{% trans \n\nfoo %}{% endtrans %}")->render();
5353
}
5454

5555
public function testTransComplexBody()
5656
{
5757
$this->expectException('Twig\Error\SyntaxError');
5858
$this->expectExceptionMessage('A message inside a trans tag must be a simple text in "index" at line 2.');
59-
$output = $this->getTemplate("{% trans %}\n{{ 1 + 2 }}{% endtrans %}")->render();
59+
$this->getTemplate("{% trans %}\n{{ 1 + 2 }}{% endtrans %}")->render();
6060
}
6161

6262
public function testTransChoiceComplexBody()
6363
{
6464
$this->expectException('Twig\Error\SyntaxError');
6565
$this->expectExceptionMessage('A message inside a transchoice tag must be a simple text in "index" at line 2.');
66-
$output = $this->getTemplate("{% transchoice count %}\n{{ 1 + 2 }}{% endtranschoice %}")->render();
66+
$this->getTemplate("{% transchoice count %}\n{{ 1 + 2 }}{% endtranschoice %}")->render();
6767
}
6868

6969
public function getTransTests()

0 commit comments

Comments
 (0)