diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index 1feabd1a45..147be98b90 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -187,7 +187,7 @@ class EntityTypeTest extends BaseTypeTest public function testConfigureQueryBuilderWithNonQueryBuilderAndNonClosure() { $this->expectException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException'); - $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, [ + $this->factory->createNamed('name', static::TESTED_TYPE, null, [ 'em' => 'default', 'class' => self::SINGLE_IDENT_CLASS, 'query_builder' => new \stdClass(), diff --git a/src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php b/src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php index 612bec14e5..8925d58877 100644 --- a/src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php +++ b/src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php @@ -28,7 +28,6 @@ class SearchAndRenderBlockNode extends FunctionExpression preg_match('/_([^_]+)$/', $this->getAttribute('name'), $matches); - $label = null; $arguments = iterator_to_array($this->getNode('arguments')); $blockNameSuffix = $matches[1]; diff --git a/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php b/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php index 4a3f04fdde..eb132e7202 100644 --- a/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php +++ b/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php @@ -180,10 +180,10 @@ class AppVariableTest extends TestCase $flashMessages = $this->setFlashMessages(); $this->assertEquals($flashMessages, $this->appVariable->getFlashes([])); - $flashMessages = $this->setFlashMessages(); + $this->setFlashMessages(); $this->assertEquals([], $this->appVariable->getFlashes('this-does-not-exist')); - $flashMessages = $this->setFlashMessages(); + $this->setFlashMessages(); $this->assertEquals( ['this-does-not-exist' => []], $this->appVariable->getFlashes(['this-does-not-exist']) diff --git a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php index db10ccb6c0..84154512be 100644 --- a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php @@ -52,7 +52,7 @@ class LintCommandTest extends TestCase $filename = $this->createFile(''); unlink($filename); - $ret = $tester->execute(['filename' => [$filename]], ['decorated' => false]); + $tester->execute(['filename' => [$filename]], ['decorated' => false]); } public function testLintFileCompileTimeException() diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php index 2b38122e56..35f3baa1b9 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php @@ -34,7 +34,7 @@ class StopwatchExtensionTest extends TestCase $twig->addExtension(new StopwatchExtension($this->getStopwatch($events))); try { - $nodes = $twig->render('template'); + $twig->render('template'); } catch (RuntimeError $e) { throw $e->getPrevious(); } diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php index aeb109fd25..206cda6783 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php @@ -49,21 +49,21 @@ class TranslationExtensionTest extends TestCase { $this->expectException('Twig\Error\SyntaxError'); $this->expectExceptionMessage('Unexpected token. Twig was looking for the "with", "from", or "into" keyword in "index" at line 3.'); - $output = $this->getTemplate("{% trans \n\nfoo %}{% endtrans %}")->render(); + $this->getTemplate("{% trans \n\nfoo %}{% endtrans %}")->render(); } public function testTransComplexBody() { $this->expectException('Twig\Error\SyntaxError'); $this->expectExceptionMessage('A message inside a trans tag must be a simple text in "index" at line 2.'); - $output = $this->getTemplate("{% trans %}\n{{ 1 + 2 }}{% endtrans %}")->render(); + $this->getTemplate("{% trans %}\n{{ 1 + 2 }}{% endtrans %}")->render(); } public function testTransChoiceComplexBody() { $this->expectException('Twig\Error\SyntaxError'); $this->expectExceptionMessage('A message inside a transchoice tag must be a simple text in "index" at line 2.'); - $output = $this->getTemplate("{% transchoice count %}\n{{ 1 + 2 }}{% endtranschoice %}")->render(); + $this->getTemplate("{% transchoice count %}\n{{ 1 + 2 }}{% endtranschoice %}")->render(); } public function getTransTests() diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 43a811b92d..f17a1bba21 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -425,7 +425,6 @@ class TextDescriptor extends Descriptor $tableHeaders = ['Order', 'Callable', 'Priority']; $tableRows = []; - $order = 1; foreach ($eventListeners as $order => $listener) { $tableRows[] = [sprintf('#%d', $order + 1), $this->formatCallable($listener), $eventDispatcher->getListenerPriority($event, $listener)]; } diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index a190dba908..3e28e52ad3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -1043,8 +1043,6 @@ class FrameworkExtension extends Extension $container->getDefinition('assets.url_package')->setPrivate(true); $container->getDefinition('assets.static_version_strategy')->setPrivate(true); - $defaultVersion = null; - if ($config['version_strategy']) { $defaultVersion = new Reference($config['version_strategy']); } else { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php index 169dba0e29..c039345653 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php @@ -277,8 +277,7 @@ abstract class ControllerTraitTest extends TestCase $this->expectException('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); $controller = $this->createController(); - /* @var BinaryFileResponse $response */ - $response = $controller->file('some-file.txt', 'test.php'); + $controller->file('some-file.txt', 'test.php'); } public function testIsGranted() diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConstraintValidatorsPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConstraintValidatorsPassTest.php index 81a8512858..1d998395e2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConstraintValidatorsPassTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConstraintValidatorsPassTest.php @@ -51,7 +51,7 @@ class AddConstraintValidatorsPassTest extends TestCase $this->expectException('InvalidArgumentException'); $this->expectExceptionMessage('The service "my_abstract_constraint_validator" tagged "validator.constraint_validator" must not be abstract.'); $container = new ContainerBuilder(); - $validatorFactory = $container->register('validator.validator_factory') + $container->register('validator.validator_factory') ->addArgument([]); $container->register('my_abstract_constraint_validator') diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 431cc0c084..556fd9afd4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -251,7 +251,7 @@ abstract class FrameworkExtensionTest extends TestCase */ public function testDeprecatedWorkflowMissingType() { - $container = $this->createContainerFromFile('workflows_without_type'); + $this->createContainerFromFile('workflows_without_type'); } public function testWorkflowCannotHaveBothTypeAndService() diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php index 59670fdd19..0ae7669ce8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php @@ -26,7 +26,7 @@ class TestExtension extends Extension implements PrependExtensionInterface public function load(array $configs, ContainerBuilder $container) { $configuration = $this->getConfiguration($configs, $container); - $config = $this->processConfiguration($configuration, $configs); + $this->processConfiguration($configuration, $configs); $container->setAlias('test.annotation_reader', new Alias('annotation_reader', true)); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php index c99b5e073e..3a87f7e4e6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php @@ -59,7 +59,7 @@ class SessionTest extends AbstractWebTestCase } // set flash - $crawler = $client->request('GET', '/session_setflash/Hello%20world.'); + $client->request('GET', '/session_setflash/Hello%20world.'); // check flash displays on redirect $this->assertStringContainsString('Hello world.', $client->followRedirect()->text()); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php index c9396624f0..e38e11601b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php @@ -162,7 +162,7 @@ class TranslatorTest extends TestCase $this->expectException('InvalidArgumentException'); $this->expectExceptionMessage('Missing third $defaultLocale argument.'); $container = $this->getMockBuilder(ContainerInterface::class)->getMock(); - $translator = new Translator($container, new MessageFormatter()); + new Translator($container, new MessageFormatter()); } /** diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php index 9eb9a08177..01e03b0312 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php @@ -61,7 +61,7 @@ class AbstractFactoryTest extends TestCase $options['failure_handler'] = $serviceId; } - list($container, $authProviderId, $listenerId, $entryPointId) = $this->callFactory('foo', $options, 'user_provider', 'entry_point'); + list($container) = $this->callFactory('foo', $options, 'user_provider', 'entry_point'); $definition = $container->getDefinition('abstract_listener.foo'); $arguments = $definition->getArguments(); @@ -99,7 +99,7 @@ class AbstractFactoryTest extends TestCase $options['success_handler'] = $serviceId; } - list($container, $authProviderId, $listenerId, $entryPointId) = $this->callFactory('foo', $options, 'user_provider', 'entry_point'); + list($container) = $this->callFactory('foo', $options, 'user_provider', 'entry_point'); $definition = $container->getDefinition('abstract_listener.foo'); $arguments = $definition->getArguments(); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php index f327eece8f..fd812c13ae 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php @@ -159,7 +159,7 @@ class GuardAuthenticationFactoryTest extends TestCase 'authenticators' => ['authenticator123', 'authenticatorABC'], 'entry_point' => 'authenticatorABC', ]; - list($container, $entryPointId) = $this->executeCreate($config, null); + list(, $entryPointId) = $this->executeCreate($config, null); $this->assertEquals('authenticatorABC', $entryPointId); } @@ -172,7 +172,7 @@ class GuardAuthenticationFactoryTest extends TestCase $userProviderId = 'my_user_provider'; $factory = new GuardAuthenticationFactory(); - list($providerId, $listenerId, $entryPointId) = $factory->create($container, $id, $config, $userProviderId, $defaultEntryPointId); + list(, , $entryPointId) = $factory->create($container, $id, $config, $userProviderId, $defaultEntryPointId); return [$container, $entryPointId]; } diff --git a/src/Symfony/Component/BrowserKit/Tests/CookieTest.php b/src/Symfony/Component/BrowserKit/Tests/CookieTest.php index 1404da9a1c..84c4a0c2e0 100644 --- a/src/Symfony/Component/BrowserKit/Tests/CookieTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/CookieTest.php @@ -198,6 +198,6 @@ class CookieTest extends TestCase { $this->expectException('UnexpectedValueException'); $this->expectExceptionMessage('The cookie expiration time "string" is not valid.'); - $cookie = new Cookie('foo', 'bar', 'string'); + new Cookie('foo', 'bar', 'string'); } } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php index 909191960f..536e2c2d4d 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php @@ -70,7 +70,7 @@ class MaxIdLengthAdapterTest extends TestCase { $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); $this->expectExceptionMessage('Namespace must be 26 chars max, 40 given ("----------------------------------------")'); - $cache = $this->getMockBuilder(MaxIdLengthAdapter::class) + $this->getMockBuilder(MaxIdLengthAdapter::class) ->setConstructorArgs([str_repeat('-', 40)]) ->getMock(); } diff --git a/src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php b/src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php index 438af9f286..38ae6ff7b8 100644 --- a/src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php +++ b/src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php @@ -19,7 +19,7 @@ class DelegatingLoaderTest extends TestCase { public function testConstructor() { - $loader = new DelegatingLoader($resolver = new LoaderResolver()); + new DelegatingLoader($resolver = new LoaderResolver()); $this->assertTrue(true, '__construct() takes a loader resolver as its first argument'); } diff --git a/src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php index 6b38e33baf..ad331240de 100644 --- a/src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php @@ -67,7 +67,7 @@ EOF $loadedClass = 123; - $res = new ClassExistenceResource('MissingFooClass', false); + new ClassExistenceResource('MissingFooClass', false); $this->assertSame(123, $loadedClass); } finally { diff --git a/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php index 69f781c2e9..40b1790101 100644 --- a/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php @@ -67,7 +67,7 @@ class DirectoryResourceTest extends TestCase { $this->expectException('InvalidArgumentException'); $this->expectExceptionMessageRegExp('/The directory ".*" does not exist./'); - $resource = new DirectoryResource('/____foo/foobar'.mt_rand(1, 999999)); + new DirectoryResource('/____foo/foobar'.mt_rand(1, 999999)); } public function testIsFresh() @@ -165,7 +165,7 @@ class DirectoryResourceTest extends TestCase { $resource = new DirectoryResource($this->directory, '/\.(foo|xml)$/'); - $unserialized = unserialize(serialize($resource)); + unserialize(serialize($resource)); $this->assertSame(realpath($this->directory), $resource->getResource()); $this->assertSame('/\.(foo|xml)$/', $resource->getPattern()); diff --git a/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php index bf9e6f3155..968c7e9266 100644 --- a/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php @@ -57,7 +57,7 @@ class FileResourceTest extends TestCase { $this->expectException('InvalidArgumentException'); $this->expectExceptionMessageRegExp('/The file ".*" does not exist./'); - $resource = new FileResource('/____foo/foobar'.mt_rand(1, 999999)); + new FileResource('/____foo/foobar'.mt_rand(1, 999999)); } public function testIsFresh() @@ -76,7 +76,7 @@ class FileResourceTest extends TestCase public function testSerializeUnserialize() { - $unserialized = unserialize(serialize($this->resource)); + unserialize(serialize($this->resource)); $this->assertSame(realpath($this->file), $this->resource->getResource()); } diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php index d61418f37b..1ef2ed3d78 100644 --- a/src/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php @@ -521,7 +521,7 @@ class ApplicationTest extends TestCase // Subnamespace + plural try { - $a = $application->find('foo3:'); + $application->find('foo3:'); $this->fail('->find() should throw an Symfony\Component\Console\Exception\CommandNotFoundException if a command is ambiguous because of a subnamespace, with alternatives'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e); diff --git a/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php b/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php index 6d803fc251..1428cf5e97 100644 --- a/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php @@ -104,7 +104,7 @@ class ProgressIndicatorTest extends TestCase { $this->expectException('InvalidArgumentException'); $this->expectExceptionMessage('Must have at least 2 indicator value characters.'); - $bar = new ProgressIndicator($this->getOutputStream(), null, 100, ['1']); + new ProgressIndicator($this->getOutputStream(), null, 100, ['1']); } public function testCannotStartAlreadyStartedIndicator() diff --git a/src/Symfony/Component/Debug/DebugClassLoader.php b/src/Symfony/Component/Debug/DebugClassLoader.php index a3b7ac6323..b0174187af 100644 --- a/src/Symfony/Component/Debug/DebugClassLoader.php +++ b/src/Symfony/Component/Debug/DebugClassLoader.php @@ -404,7 +404,7 @@ class DebugClassLoader } if (isset($dirFiles[$file])) { - return $real .= $dirFiles[$file]; + return $real.$dirFiles[$file]; } $kFile = strtolower($file); @@ -423,7 +423,7 @@ class DebugClassLoader self::$darwinCache[$kDir][1] = $dirFiles; } - return $real .= $dirFiles[$kFile]; + return $real.$dirFiles[$kFile]; } /** diff --git a/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php b/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php index bcb86b4e3f..0290b05bad 100644 --- a/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php +++ b/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php @@ -256,7 +256,7 @@ class FlattenExceptionTest extends TestCase // assertEquals() does not like NAN values. $this->assertEquals($array[$i][0], 'float'); - $this->assertNan($array[$i++][1]); + $this->assertNan($array[$i][1]); } public function testRecursionInArguments() diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index b6d0b03b2b..7596b9953b 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -219,7 +219,7 @@ EOF; foreach ($ids as $id) { $c .= ' '.$this->doExport($id)." => true,\n"; } - $files['removed-ids.php'] = $c .= "];\n"; + $files['removed-ids.php'] = $c."];\n"; } foreach ($this->generateServiceFiles() as $file => $c) { diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php index 0bd94a3e60..66b6e19cc3 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php @@ -25,28 +25,28 @@ class AnalyzeServiceReferencesPassTest extends TestCase { $container = new ContainerBuilder(); - $a = $container + $container ->register('a') ->addArgument($ref1 = new Reference('b')) ; - $b = $container + $container ->register('b') ->addMethodCall('setA', [$ref2 = new Reference('a')]) ; - $c = $container + $container ->register('c') ->addArgument($ref3 = new Reference('a')) ->addArgument($ref4 = new Reference('b')) ; - $d = $container + $container ->register('d') ->setProperty('foo', $ref5 = new Reference('b')) ; - $e = $container + $container ->register('e') ->setConfigurator([$ref6 = new Reference('b'), 'methodName']) ; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php index 10c34aa489..348d1d7f53 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php @@ -43,7 +43,7 @@ class IntegrationTest extends TestCase ->addArgument(new Reference('c')) ; - $b = $container + $container ->register('b', '\stdClass') ->addArgument(new Reference('c')) ->setPublic(false) diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php index 27bb9157c8..eee4cf730c 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php @@ -390,7 +390,7 @@ class ResolveChildDefinitionsPassTest extends TestCase ->setBindings(['a' => '1', 'b' => '2']) ; - $child = $container->setDefinition('child', new ChildDefinition('parent')) + $container->setDefinition('child', new ChildDefinition('parent')) ->setBindings(['b' => 'B', 'c' => 'C']) ; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php index 0ab6303164..81e05fb284 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php @@ -87,8 +87,8 @@ class ResolveClassPassTest extends TestCase $this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException'); $this->expectExceptionMessage('Service definition "App\Foo\Child" has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.'); $container = new ContainerBuilder(); - $parent = $container->register('App\Foo', null); - $child = $container->setDefinition('App\Foo\Child', new ChildDefinition('App\Foo')); + $container->register('App\Foo', null); + $container->setDefinition('App\Foo\Child', new ChildDefinition('App\Foo')); (new ResolveClassPass())->process($container); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index 199179c9b4..f2666ef962 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -1265,7 +1265,7 @@ class ContainerBuilderTest extends TestCase $this->expectExceptionMessage('The definition for "DateTime" has no class attribute, and appears to reference a class or interface in the global namespace.'); $container = new ContainerBuilder(); - $definition = $container->register(\DateTime::class); + $container->register(\DateTime::class); $container->compile(); } @@ -1295,7 +1295,7 @@ class ContainerBuilderTest extends TestCase $this->expectExceptionMessage('The definition for "123_abc" has no class.'); $container = new ContainerBuilder(); - $definition = $container->register('123_abc'); + $container->register('123_abc'); $container->compile(); } @@ -1305,7 +1305,7 @@ class ContainerBuilderTest extends TestCase $this->expectExceptionMessage('The definition for "\foo" has no class.'); $container = new ContainerBuilder(); - $definition = $container->register('\\foo'); + $container->register('\\foo'); $container->compile(); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index 4e6083d998..b2cbb3caf6 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -886,7 +886,7 @@ class PhpDumperTest extends TestCase ->setPublic(true) ->addArgument($baz); - $passConfig = $container->getCompiler()->getPassConfig(); + $container->getCompiler()->getPassConfig(); $container->compile(); $dumper = new PhpDumper($container); @@ -978,7 +978,6 @@ class PhpDumperTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - $dump = $dumper->dump(); $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_adawson.php', $dumper->dump()); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php index 1b6e51c567..2b963968d8 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php @@ -808,7 +808,6 @@ class XmlFileLoaderTest extends TestCase $container->compile(); $dumper = new PhpDumper($container); - $dump = $dumper->dump(); $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_tsantos.php', $dumper->dump()); } diff --git a/src/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php b/src/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php index 61e776736a..176ea5927f 100644 --- a/src/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php @@ -19,7 +19,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase { $node = $this->createNode('textarea', ''); try { - $field = new ChoiceFormField($node); + new ChoiceFormField($node); $this->fail('->initialize() throws a \LogicException if the node is not an input or a select'); } catch (\LogicException $e) { $this->assertTrue(true, '->initialize() throws a \LogicException if the node is not an input or a select'); @@ -27,7 +27,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase $node = $this->createNode('input', '', ['type' => 'text']); try { - $field = new ChoiceFormField($node); + new ChoiceFormField($node); $this->fail('->initialize() throws a \LogicException if the node is an input with a type different from checkbox or radio'); } catch (\LogicException $e) { $this->assertTrue(true, '->initialize() throws a \LogicException if the node is an input with a type different from checkbox or radio'); diff --git a/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php b/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php index 9b359d6978..b14bcc855e 100644 --- a/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php @@ -24,7 +24,7 @@ class FileFormFieldTest extends FormFieldTestCase $node = $this->createNode('textarea', ''); try { - $field = new FileFormField($node); + new FileFormField($node); $this->fail('->initialize() throws a \LogicException if the node is not an input field'); } catch (\LogicException $e) { $this->assertTrue(true, '->initialize() throws a \LogicException if the node is not an input field'); @@ -32,7 +32,7 @@ class FileFormFieldTest extends FormFieldTestCase $node = $this->createNode('input', '', ['type' => 'text']); try { - $field = new FileFormField($node); + new FileFormField($node); $this->fail('->initialize() throws a \LogicException if the node is not a file input field'); } catch (\LogicException $e) { $this->assertTrue(true, '->initialize() throws a \LogicException if the node is not a file input field'); diff --git a/src/Symfony/Component/DomCrawler/Tests/Field/InputFormFieldTest.php b/src/Symfony/Component/DomCrawler/Tests/Field/InputFormFieldTest.php index 5758f1b7bb..a1f327bbc2 100644 --- a/src/Symfony/Component/DomCrawler/Tests/Field/InputFormFieldTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/Field/InputFormFieldTest.php @@ -24,7 +24,7 @@ class InputFormFieldTest extends FormFieldTestCase $node = $this->createNode('textarea', ''); try { - $field = new InputFormField($node); + new InputFormField($node); $this->fail('->initialize() throws a \LogicException if the node is not an input'); } catch (\LogicException $e) { $this->assertTrue(true, '->initialize() throws a \LogicException if the node is not an input'); @@ -32,7 +32,7 @@ class InputFormFieldTest extends FormFieldTestCase $node = $this->createNode('input', '', ['type' => 'checkbox']); try { - $field = new InputFormField($node); + new InputFormField($node); $this->fail('->initialize() throws a \LogicException if the node is a checkbox'); } catch (\LogicException $e) { $this->assertTrue(true, '->initialize() throws a \LogicException if the node is a checkbox'); @@ -40,7 +40,7 @@ class InputFormFieldTest extends FormFieldTestCase $node = $this->createNode('input', '', ['type' => 'file']); try { - $field = new InputFormField($node); + new InputFormField($node); $this->fail('->initialize() throws a \LogicException if the node is a file'); } catch (\LogicException $e) { $this->assertTrue(true, '->initialize() throws a \LogicException if the node is a file'); diff --git a/src/Symfony/Component/DomCrawler/Tests/Field/TextareaFormFieldTest.php b/src/Symfony/Component/DomCrawler/Tests/Field/TextareaFormFieldTest.php index 5d4d003826..192984ce29 100644 --- a/src/Symfony/Component/DomCrawler/Tests/Field/TextareaFormFieldTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/Field/TextareaFormFieldTest.php @@ -24,7 +24,7 @@ class TextareaFormFieldTest extends FormFieldTestCase $node = $this->createNode('input', ''); try { - $field = new TextareaFormField($node); + new TextareaFormField($node); $this->fail('->initialize() throws a \LogicException if the node is not a textarea'); } catch (\LogicException $e) { $this->assertTrue(true, '->initialize() throws a \LogicException if the node is not a textarea'); diff --git a/src/Symfony/Component/DomCrawler/Tests/FormTest.php b/src/Symfony/Component/DomCrawler/Tests/FormTest.php index 504a9bd425..45d964b08c 100644 --- a/src/Symfony/Component/DomCrawler/Tests/FormTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/FormTest.php @@ -39,14 +39,14 @@ class FormTest extends TestCase $nodes = $dom->getElementsByTagName('input'); try { - $form = new Form($nodes->item(0), 'http://example.com'); + new Form($nodes->item(0), 'http://example.com'); $this->fail('__construct() throws a \\LogicException if the node has no form ancestor'); } catch (\LogicException $e) { $this->assertTrue(true, '__construct() throws a \\LogicException if the node has no form ancestor'); } try { - $form = new Form($nodes->item(1), 'http://example.com'); + new Form($nodes->item(1), 'http://example.com'); $this->fail('__construct() throws a \\LogicException if the input type is not submit, button, or image'); } catch (\LogicException $e) { $this->assertTrue(true, '__construct() throws a \\LogicException if the input type is not submit, button, or image'); @@ -55,7 +55,7 @@ class FormTest extends TestCase $nodes = $dom->getElementsByTagName('button'); try { - $form = new Form($nodes->item(0), 'http://example.com'); + new Form($nodes->item(0), 'http://example.com'); $this->fail('__construct() throws a \\LogicException if the node has no form ancestor'); } catch (\LogicException $e) { $this->assertTrue(true, '__construct() throws a \\LogicException if the node has no form ancestor'); @@ -63,11 +63,19 @@ class FormTest extends TestCase } /** - * __construct() should throw \\LogicException if the form attribute is invalid. + * @dataProvider constructorThrowsExceptionIfNoRelatedFormProvider + * + * __construct() should throw a \LogicException if the form attribute is invalid. */ - public function testConstructorThrowsExceptionIfNoRelatedForm() + public function testConstructorThrowsExceptionIfNoRelatedForm(\DOMElement $node) { $this->expectException('LogicException'); + + new Form($node, 'http://example.com'); + } + + public function constructorThrowsExceptionIfNoRelatedFormProvider() + { $dom = new \DOMDocument(); $dom->loadHTML(' @@ -81,8 +89,10 @@ class FormTest extends TestCase $nodes = $dom->getElementsByTagName('input'); - $form = new Form($nodes->item(0), 'http://example.com'); - $form = new Form($nodes->item(1), 'http://example.com'); + return [ + [$nodes->item(0)], + [$nodes->item(1)], + ]; } public function testConstructorLoadsOnlyFieldsOfTheRightForm() diff --git a/src/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php b/src/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php index 34e28bcbb2..61c047af39 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php @@ -37,10 +37,6 @@ class RegisterListenersPassTest extends TestCase public function testValidEventSubscriber() { - $services = [ - 'my_event_subscriber' => [0 => []], - ]; - $builder = new ContainerBuilder(); $eventDispatcherDefinition = $builder->register('event_dispatcher'); $builder->register('my_event_subscriber', 'Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService') diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php index 22d1d1649d..f69ee57982 100644 --- a/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php +++ b/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php @@ -98,7 +98,7 @@ class ExpressionLanguageTest extends TestCase $this->expectException('InvalidArgumentException'); $this->expectExceptionMessage('Cache argument has to implement Psr\Cache\CacheItemPoolInterface.'); $cacheMock = $this->getMockBuilder('Psr\Cache\CacheItemSpoolInterface')->getMock(); - $expressionLanguage = new ExpressionLanguage($cacheMock); + new ExpressionLanguage($cacheMock); } public function testConstantFunction() @@ -196,7 +196,7 @@ class ExpressionLanguageTest extends TestCase $cacheMock = $this->getMockBuilder('Psr\Cache\CacheItemPoolInterface')->getMock(); $cacheItemMock = $this->getMockBuilder('Psr\Cache\CacheItemInterface')->getMock(); $expressionLanguage = new ExpressionLanguage($cacheMock); - $savedParsedExpressions = []; + $savedParsedExpression = null; $cacheMock ->expects($this->exactly(2)) diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/ParserCache/ParserCacheAdapterTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/ParserCache/ParserCacheAdapterTest.php index 28e9ef5725..2e9263307f 100644 --- a/src/Symfony/Component/ExpressionLanguage/Tests/ParserCache/ParserCacheAdapterTest.php +++ b/src/Symfony/Component/ExpressionLanguage/Tests/ParserCache/ParserCacheAdapterTest.php @@ -68,7 +68,7 @@ class ParserCacheAdapterTest extends TestCase ->willReturn($value) ; - $cacheItem = $parserCacheAdapter->save($cacheItemMock); + $parserCacheAdapter->save($cacheItemMock); } public function testGetItems() diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php index d4602b88fd..ce91d05ff4 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php @@ -181,10 +181,10 @@ class DateTimeToLocalizedStringTransformerTest extends TestCase public function testTransformWrapsIntlErrors() { - $transformer = new DateTimeToLocalizedStringTransformer(); - $this->markTestIncomplete('Checking for intl errors needs to be reimplemented'); + $transformer = new DateTimeToLocalizedStringTransformer(); + // HOW TO REPRODUCE? //$this->expectException('Symfony\Component\Form\Extension\Core\DataTransformer\TransformationFailedException'); diff --git a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php index 4186c72a62..2ea924bac2 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php @@ -153,7 +153,7 @@ class UploadedFileTest extends TestCase UPLOAD_ERR_OK ); - $movedFile = $file->move(__DIR__.'/Fixtures/directory'); + $file->move(__DIR__.'/Fixtures/directory'); } public function testMoveLocalFileIsAllowedInTestMode() diff --git a/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php index dcc266f69c..cabe038bdf 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php @@ -59,7 +59,7 @@ class HeaderBagTest extends TestCase { $this->expectException('RuntimeException'); $bag = new HeaderBag(['foo' => 'Tue']); - $headerDate = $bag->getDate('foo'); + $bag->getDate('foo'); } public function testGetCacheControlHeader() diff --git a/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php index 92f4876da4..e1ff3bf2bd 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php @@ -29,13 +29,13 @@ class RedirectResponseTest extends TestCase public function testRedirectResponseConstructorNullUrl() { $this->expectException('InvalidArgumentException'); - $response = new RedirectResponse(null); + new RedirectResponse(null); } public function testRedirectResponseConstructorWrongStatusCode() { $this->expectException('InvalidArgumentException'); - $response = new RedirectResponse('foo.bar', 404); + new RedirectResponse('foo.bar', 404); } public function testGenerateLocationHeader() diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php index 9daf1a0eee..7de55798a6 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php @@ -41,7 +41,7 @@ class NativeFileSessionHandlerTest extends TestCase */ public function testConstructSavePath($savePath, $expectedSavePath, $path) { - $handler = new NativeFileSessionHandler($savePath); + new NativeFileSessionHandler($savePath); $this->assertEquals($expectedSavePath, ini_get('session.save_path')); $this->assertDirectoryExists(realpath($path)); @@ -62,13 +62,13 @@ class NativeFileSessionHandlerTest extends TestCase public function testConstructException() { $this->expectException('InvalidArgumentException'); - $handler = new NativeFileSessionHandler('something;invalid;with;too-many-args'); + new NativeFileSessionHandler('something;invalid;with;too-many-args'); } public function testConstructDefault() { $path = ini_get('session.save_path'); - $storage = new NativeSessionStorage(['name' => 'TESTING'], new NativeFileSessionHandler()); + new NativeSessionStorage(['name' => 'TESTING'], new NativeFileSessionHandler()); $this->assertEquals($path, ini_get('session.save_path')); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php index 0d246e1aa5..f793db144c 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php @@ -28,7 +28,7 @@ class NullSessionHandlerTest extends TestCase { public function testSaveHandlers() { - $storage = $this->getStorage(); + $this->getStorage(); $this->assertEquals('user', ini_get('session.save_handler')); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php index 123b605d28..e710dca92c 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -54,7 +54,7 @@ class PdoSessionHandlerTest extends TestCase $pdo = $this->getMemorySqlitePdo(); $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_SILENT); - $storage = new PdoSessionHandler($pdo); + new PdoSessionHandler($pdo); } public function testInexistentTable() diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php index fa170d17d3..9ce8108dac 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -145,7 +145,7 @@ class NativeSessionStorageTest extends TestCase { $this->iniSet('session.cache_limiter', 'nocache'); - $storage = new NativeSessionStorage(); + new NativeSessionStorage(); $this->assertEquals('', ini_get('session.cache_limiter')); } @@ -153,7 +153,7 @@ class NativeSessionStorageTest extends TestCase { $this->iniSet('session.cache_limiter', 'nocache'); - $storage = new NativeSessionStorage(['cache_limiter' => 'public']); + new NativeSessionStorage(['cache_limiter' => 'public']); $this->assertEquals('public', ini_get('session.cache_limiter')); } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php index 671865aa16..246c0c7f6f 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php @@ -49,7 +49,6 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter } } - $content = null; try { $content = $request->getContent(); } catch (\LogicException $e) { @@ -59,7 +58,6 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter $sessionMetadata = []; $sessionAttributes = []; - $session = null; $flashes = []; if ($request->hasSession()) { $session = $request->getSession(); diff --git a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php index 25c071c335..3bdf0f5199 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php @@ -130,7 +130,6 @@ class ResponseCacheStrategy implements ResponseCacheStrategyInterface $response->headers->set('Cache-Control', implode(', ', array_keys($flags))); $maxAge = null; - $sMaxage = null; if (is_numeric($this->ageDirectives['max-age'])) { $maxAge = $this->ageDirectives['max-age'] + $this->age; diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php index 32cfcb8604..ef4c8b2172 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php @@ -256,7 +256,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase public function testControllersAreMadePublic() { $container = new ContainerBuilder(); - $resolver = $container->register('argument_resolver.service')->addArgument([]); + $container->register('argument_resolver.service')->addArgument([]); $container->register('foo', ArgumentWithoutTypeController::class) ->setPublic(false) diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php index fc47ff2c88..77cb34cfa5 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php @@ -52,7 +52,7 @@ class StoreTest extends TestCase public function testUnlockFileThatDoesExist() { - $cacheKey = $this->storeSimpleEntry(); + $this->storeSimpleEntry(); $this->store->lock($this->request); $this->assertTrue($this->store->unlock($this->request)); @@ -92,7 +92,7 @@ class StoreTest extends TestCase { $cacheKey = $this->storeSimpleEntry(); $entries = $this->getStoreMetadata($cacheKey); - list($req, $res) = $entries[0]; + list(, $res) = $entries[0]; $this->assertEquals('en9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', $res['x-content-digest'][0]); } @@ -208,7 +208,7 @@ class StoreTest extends TestCase { $req1 = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar']); $res1 = new Response('test 1', 200, ['Vary' => 'Foo Bar']); - $key = $this->store->write($req1, $res1); + $this->store->write($req1, $res1); $this->assertEquals($this->getStorePath('en'.hash('sha256', 'test 1')), $this->store->lookup($req1)->getContent()); $req2 = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Bling', 'HTTP_BAR' => 'Bam']); @@ -229,7 +229,7 @@ class StoreTest extends TestCase $req = Request::create('/test', 'get', [], [], [], ['HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar']); $this->assertTrue($this->store->lock($req)); - $path = $this->store->lock($req); + $this->store->lock($req); $this->assertTrue($this->store->isLocked($req)); $this->store->unlock($req); diff --git a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php index a437f2bb6f..2942695af3 100644 --- a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php +++ b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php @@ -132,9 +132,6 @@ class ExecutableFinderTest extends TestCase $this->assertSamePath(PHP_BINARY, $result); } - /** - * @requires PHP 5.4 - */ public function testFindBatchExecutableOnWindows() { if (ini_get('open_basedir')) { diff --git a/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php b/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php index 08eed456aa..b698be8f66 100644 --- a/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php +++ b/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php @@ -19,7 +19,7 @@ class RouteTest extends TestCase public function testInvalidRouteParameter() { $this->expectException('BadMethodCallException'); - $route = new Route(['foo' => 'bar']); + new Route(['foo' => 'bar']); } /** diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooTrait.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooTrait.php index ee8f4b071a..c06fb43f68 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooTrait.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooTrait.php @@ -6,7 +6,7 @@ trait FooTrait { public function doBar() { - $baz = self::class; + self::class; if (true) { } } diff --git a/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php b/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php index d3ddb9f3b1..4e725fa8bb 100644 --- a/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php +++ b/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php @@ -135,7 +135,7 @@ class PhpGeneratorDumperTest extends TestCase include $this->testTmpFilepath; $projectUrlGenerator = new \NonExistingRoutesUrlGenerator(new RequestContext()); - $url = $projectUrlGenerator->generate('NonExisting', []); + $projectUrlGenerator->generate('NonExisting', []); } public function testDumpForRouteWithDefaults() diff --git a/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php index 8af8e2e14f..0b1175f605 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php @@ -35,9 +35,6 @@ class AnnotationFileLoaderTest extends AbstractAnnotationLoaderTest $this->loader->load(__DIR__.'/../Fixtures/AnnotatedClasses/FooClass.php'); } - /** - * @requires PHP 5.4 - */ public function testLoadTraitWithClassConstant() { $this->reader->expects($this->never())->method('getClassAnnotation'); diff --git a/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php b/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php index a460c6651c..b398b2f35e 100644 --- a/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php +++ b/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php @@ -248,7 +248,7 @@ class RouteCompilerTest extends TestCase $this->expectException('LogicException'); $route = new Route('/{name}/{name}'); - $compiled = $route->compile(); + $route->compile(); } public function testRouteCharsetMismatch() @@ -256,7 +256,7 @@ class RouteCompilerTest extends TestCase $this->expectException('LogicException'); $route = new Route("/\xE9/{bar}", [], ['bar' => '.'], ['utf8' => true]); - $compiled = $route->compile(); + $route->compile(); } public function testRequirementCharsetMismatch() @@ -264,7 +264,7 @@ class RouteCompilerTest extends TestCase $this->expectException('LogicException'); $route = new Route('/foo/{bar}', [], ['bar' => "\xE9"], ['utf8' => true]); - $compiled = $route->compile(); + $route->compile(); } public function testRouteWithFragmentAsPathParameter() @@ -272,7 +272,7 @@ class RouteCompilerTest extends TestCase $this->expectException('InvalidArgumentException'); $route = new Route('/{_fragment}'); - $compiled = $route->compile(); + $route->compile(); } /** diff --git a/src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php b/src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php index 0b2c36c72d..48b7ebcbb2 100644 --- a/src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php @@ -117,7 +117,7 @@ class EncoderFactoryTest extends TestCase $user = new EncAwareUser('user', 'pass'); $user->encoderName = 'invalid_encoder_name'; - $encoder = $factory->getEncoder($user); + $factory->getEncoder($user); } public function testGetEncoderForEncoderAwareWithClassName() diff --git a/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php b/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php index 2c4faaa31a..c2c1dde623 100644 --- a/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php +++ b/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php @@ -192,7 +192,7 @@ class GuardAuthenticationProviderTest extends TestCase $token->setAuthenticated(false); $provider = new GuardAuthenticationProvider([], $this->userProvider, $providerKey, $this->userChecker); - $actualToken = $provider->authenticate($token); + $provider->authenticate($token); } public function testSupportsChecksGuardAuthenticatorsTokenOrigin() diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php index 2b6e662700..fd49b54ccc 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php @@ -20,7 +20,7 @@ class LogoutListenerTest extends TestCase { public function testHandleUnmatchedPath() { - list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener(); + list($listener, , $httpUtils, $options) = $this->getListener(); list($event, $request) = $this->getGetResponseEvent(); @@ -130,7 +130,7 @@ class LogoutListenerTest extends TestCase $this->expectException('RuntimeException'); $successHandler = $this->getSuccessHandler(); - list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener($successHandler); + list($listener, , $httpUtils, $options) = $this->getListener($successHandler); list($event, $request) = $this->getGetResponseEvent(); @@ -152,7 +152,7 @@ class LogoutListenerTest extends TestCase $this->expectException('Symfony\Component\Security\Core\Exception\LogoutException'); $tokenManager = $this->getTokenManager(); - list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener(null, $tokenManager); + list($listener, , $httpUtils, $options) = $this->getListener(null, $tokenManager); list($event, $request) = $this->getGetResponseEvent(); diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php index 4478a1a4d8..0770872968 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php @@ -221,7 +221,7 @@ class RememberMeListenerTest extends TestCase public function testSessionStrategy() { - list($listener, $tokenStorage, $service, $manager, , $dispatcher, $sessionStrategy) = $this->getListener(false, true, true); + list($listener, $tokenStorage, $service, $manager, , , $sessionStrategy) = $this->getListener(false, true, true); $tokenStorage ->expects($this->once()) @@ -286,7 +286,7 @@ class RememberMeListenerTest extends TestCase public function testSessionIsMigratedByDefault() { - list($listener, $tokenStorage, $service, $manager, , $dispatcher, $sessionStrategy) = $this->getListener(false, true, false); + list($listener, $tokenStorage, $service, $manager) = $this->getListener(false, true, false); $tokenStorage ->expects($this->once()) diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.php index 02d1ba03ce..fd29297a57 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.php @@ -60,7 +60,7 @@ class RemoteUserAuthenticationListenerTest extends TestCase $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); $method->setAccessible(true); - $result = $method->invokeArgs($listener, [$request]); + $method->invokeArgs($listener, [$request]); } public function testGetPreAuthenticatedDataWithDifferentKeys() diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php index e35e685d5b..c81b2d589e 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php @@ -98,7 +98,7 @@ class X509AuthenticationListenerTest extends TestCase $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); $method->setAccessible(true); - $result = $method->invokeArgs($listener, [$request]); + $method->invokeArgs($listener, [$request]); } public function testGetPreAuthenticatedDataWithDifferentKeys() diff --git a/src/Symfony/Component/Security/Http/Tests/FirewallTest.php b/src/Symfony/Component/Security/Http/Tests/FirewallTest.php index 673a8be713..774db6128f 100644 --- a/src/Symfony/Component/Security/Http/Tests/FirewallTest.php +++ b/src/Symfony/Component/Security/Http/Tests/FirewallTest.php @@ -48,8 +48,6 @@ class FirewallTest extends TestCase public function testOnKernelRequestStopsWhenThereIsAResponse() { - $response = new Response(); - $first = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock(); $first ->expects($this->once()) diff --git a/src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php b/src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php index 465636eb9f..0a97ea7b8a 100644 --- a/src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php @@ -65,8 +65,6 @@ class ResponseListenerTest extends TestCase public function testItSubscribesToTheOnKernelResponseEvent() { - $listener = new ResponseListener(); - $this->assertSame([KernelEvents::RESPONSE => 'onKernelResponse'], ResponseListener::getSubscribedEvents()); } diff --git a/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php b/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php index c6dcdefc95..781e19d935 100644 --- a/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php +++ b/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php @@ -27,7 +27,6 @@ class FilesystemLoaderTest extends TestCase public function testConstructor() { $pathPattern = self::$fixturesPath.'/templates/%name%.%engine%'; - $path = self::$fixturesPath.'/templates'; $loader = new ProjectTemplateLoader2($pathPattern); $this->assertEquals([$pathPattern], $loader->getTemplatePathPatterns(), '__construct() takes a path as its second argument'); $loader = new ProjectTemplateLoader2([$pathPattern]); diff --git a/src/Symfony/Component/Validator/Constraints/FileValidator.php b/src/Symfony/Component/Validator/Constraints/FileValidator.php index d3e3833ab7..0a58cd2d68 100644 --- a/src/Symfony/Component/Validator/Constraints/FileValidator.php +++ b/src/Symfony/Component/Validator/Constraints/FileValidator.php @@ -60,7 +60,7 @@ class FileValidator extends ConstraintValidator $binaryFormat = null === $constraint->binaryFormat ? true : $constraint->binaryFormat; } - list($sizeAsString, $limitAsString, $suffix) = $this->factorizeSizes(0, $limitInBytes, $binaryFormat); + list(, $limitAsString, $suffix) = $this->factorizeSizes(0, $limitInBytes, $binaryFormat); $this->context->buildViolation($constraint->uploadIniSizeErrorMessage) ->setParameter('{{ limit }}', $limitAsString) ->setParameter('{{ suffix }}', $suffix) diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php index 67b5a8c7b9..c0c89398ce 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php @@ -450,7 +450,7 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase $reflection = new \ReflectionClass(\get_class(new FileValidator())); $method = $reflection->getMethod('factorizeSizes'); $method->setAccessible(true); - list($sizeAsString, $limit, $suffix) = $method->invokeArgs(new FileValidator(), [0, UploadedFile::getMaxFilesize(), false]); + list(, $limit, $suffix) = $method->invokeArgs(new FileValidator(), [0, UploadedFile::getMaxFilesize(), false]); // it correctly parses the maxSize option and not only uses simple string comparison // 1000M should be bigger than the ini value diff --git a/src/Symfony/Component/Workflow/Tests/DefinitionBuilderTest.php b/src/Symfony/Component/Workflow/Tests/DefinitionBuilderTest.php index 7e96c8875e..b7ffdec96e 100644 --- a/src/Symfony/Component/Workflow/Tests/DefinitionBuilderTest.php +++ b/src/Symfony/Component/Workflow/Tests/DefinitionBuilderTest.php @@ -11,7 +11,7 @@ class DefinitionBuilderTest extends TestCase public function testAddPlaceInvalidName() { $this->expectException('Symfony\Component\Workflow\Exception\InvalidArgumentException'); - $builder = new DefinitionBuilder(['a"', 'b']); + new DefinitionBuilder(['a"', 'b']); } public function testSetInitialPlace() diff --git a/src/Symfony/Component/Workflow/Tests/DefinitionTest.php b/src/Symfony/Component/Workflow/Tests/DefinitionTest.php index 185d4fd6c9..8df6494a1e 100644 --- a/src/Symfony/Component/Workflow/Tests/DefinitionTest.php +++ b/src/Symfony/Component/Workflow/Tests/DefinitionTest.php @@ -22,7 +22,7 @@ class DefinitionTest extends TestCase { $this->expectException('Symfony\Component\Workflow\Exception\InvalidArgumentException'); $places = ['a"', 'e"']; - $definition = new Definition($places, []); + new Definition($places, []); } public function testSetInitialPlace() @@ -37,7 +37,7 @@ class DefinitionTest extends TestCase { $this->expectException('Symfony\Component\Workflow\Exception\LogicException'); $this->expectExceptionMessage('Place "d" cannot be the initial place as it does not exist.'); - $definition = new Definition([], [], 'd'); + new Definition([], [], 'd'); } public function testAddTransition() diff --git a/src/Symfony/Component/Workflow/Tests/TransitionTest.php b/src/Symfony/Component/Workflow/Tests/TransitionTest.php index 009f19acfa..0e049158f7 100644 --- a/src/Symfony/Component/Workflow/Tests/TransitionTest.php +++ b/src/Symfony/Component/Workflow/Tests/TransitionTest.php @@ -11,7 +11,7 @@ class TransitionTest extends TestCase { $this->expectException('Symfony\Component\Workflow\Exception\InvalidArgumentException'); $this->expectExceptionMessage('The transition "foo.bar" contains invalid characters.'); - $transition = new Transition('foo.bar', 'a', 'b'); + new Transition('foo.bar', 'a', 'b'); } public function testConstructor() diff --git a/src/Symfony/Component/Workflow/Tests/WorkflowTest.php b/src/Symfony/Component/Workflow/Tests/WorkflowTest.php index 6a1d092a07..90990d8cbb 100644 --- a/src/Symfony/Component/Workflow/Tests/WorkflowTest.php +++ b/src/Symfony/Component/Workflow/Tests/WorkflowTest.php @@ -219,7 +219,7 @@ class WorkflowTest extends TestCase $this->assertFalse($marking->has('b')); $this->assertFalse($marking->has('c')); - $marking = $workflow->apply($subject, 'a_to_bc'); + $workflow->apply($subject, 'a_to_bc'); $marking = $workflow->apply($subject, 'b_to_c'); $this->assertFalse($marking->has('a')); @@ -291,7 +291,7 @@ class WorkflowTest extends TestCase 'workflow.workflow_name.announce.t2', ]; - $marking = $workflow->apply($subject, 't1'); + $workflow->apply($subject, 't1'); $this->assertSame($eventNameExpected, $eventDispatcher->dispatchedEvents); } @@ -330,7 +330,7 @@ class WorkflowTest extends TestCase 'workflow.workflow_name.announce', ]; - $marking = $workflow->apply($subject, 'a-b'); + $workflow->apply($subject, 'a-b'); $this->assertSame($eventNameExpected, $eventDispatcher->dispatchedEvents); } diff --git a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php index b1306f043c..349897859f 100644 --- a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php @@ -85,7 +85,7 @@ YAML; $filename = $this->createFile(''); unlink($filename); - $ret = $tester->execute(['filename' => $filename], ['decorated' => false]); + $tester->execute(['filename' => $filename], ['decorated' => false]); } /** diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php index c48f0b4f45..dc7c122d59 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -110,7 +110,7 @@ class ParserTest extends TestCase foreach ($yamls as $yaml) { try { - $content = $this->parser->parse($yaml); + $this->parser->parse($yaml); $this->fail('YAML files must not contain tabs'); } catch (\Exception $e) {