Skip to content

Commit ebc745e

Browse files
committed
Remove unused local variables in tests
1 parent eb36d11 commit ebc745e

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

Tests/Annotation/RouteTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class RouteTest extends TestCase
1919
public function testInvalidRouteParameter()
2020
{
2121
$this->expectException('BadMethodCallException');
22-
$route = new Route(['foo' => 'bar']);
22+
new Route(['foo' => 'bar']);
2323
}
2424

2525
/**

Tests/Fixtures/AnnotatedClasses/FooTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ trait FooTrait
66
{
77
public function doBar()
88
{
9-
$baz = self::class;
9+
self::class;
1010
if (true) {
1111
}
1212
}

Tests/Generator/Dumper/PhpGeneratorDumperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function testGenerateNonExistingRoute()
135135
include $this->testTmpFilepath;
136136

137137
$projectUrlGenerator = new \NonExistingRoutesUrlGenerator(new RequestContext());
138-
$url = $projectUrlGenerator->generate('NonExisting', []);
138+
$projectUrlGenerator->generate('NonExisting', []);
139139
}
140140

141141
public function testDumpForRouteWithDefaults()

Tests/Loader/AnnotationFileLoaderTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ public function testLoad()
3535
$this->loader->load(__DIR__.'/../Fixtures/AnnotatedClasses/FooClass.php');
3636
}
3737

38-
/**
39-
* @requires PHP 5.4
40-
*/
4138
public function testLoadTraitWithClassConstant()
4239
{
4340
$this->reader->expects($this->never())->method('getClassAnnotation');

Tests/RouteCompilerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,31 +248,31 @@ public function testRouteWithSameVariableTwice()
248248
$this->expectException('LogicException');
249249
$route = new Route('/{name}/{name}');
250250

251-
$compiled = $route->compile();
251+
$route->compile();
252252
}
253253

254254
public function testRouteCharsetMismatch()
255255
{
256256
$this->expectException('LogicException');
257257
$route = new Route("/\xE9/{bar}", [], ['bar' => '.'], ['utf8' => true]);
258258

259-
$compiled = $route->compile();
259+
$route->compile();
260260
}
261261

262262
public function testRequirementCharsetMismatch()
263263
{
264264
$this->expectException('LogicException');
265265
$route = new Route('/foo/{bar}', [], ['bar' => "\xE9"], ['utf8' => true]);
266266

267-
$compiled = $route->compile();
267+
$route->compile();
268268
}
269269

270270
public function testRouteWithFragmentAsPathParameter()
271271
{
272272
$this->expectException('InvalidArgumentException');
273273
$route = new Route('/{_fragment}');
274274

275-
$compiled = $route->compile();
275+
$route->compile();
276276
}
277277

278278
/**

0 commit comments

Comments
 (0)