From 1d53ca9c926a34f6674f496d4c7b75e0be1e6ea4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 24 Aug 2015 09:31:10 +0200 Subject: [PATCH] fixed CS --- .../Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php | 2 +- .../Compiler/AddSecurityVotersPass.php | 2 +- src/Symfony/Component/Console/Helper/Table.php | 2 +- .../Component/Console/Tests/Command/CommandTest.php | 3 +-- .../Component/DependencyInjection/Dumper/PhpDumper.php | 8 ++++---- .../Component/Form/Tests/AbstractDivLayoutTest.php | 1 - .../Form/Tests/Extension/Core/Type/CollectionTypeTest.php | 1 - .../Routing/Tests/Loader/DirectoryLoaderTest.php | 2 +- 8 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index ef226acdd7..7ebcb40aed 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -225,7 +225,7 @@ class EntityTypeTest extends TypeTestCase 'em' => 'default', 'class' => self::SINGLE_IDENT_CLASS, 'query_builder' => function () { - return null; + return; }, )); diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php index 099b1b48b7..992d5a5f7c 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php @@ -45,6 +45,6 @@ class AddSecurityVotersPass implements CompilerPassInterface throw new LogicException('No security voters found. You need to tag at least one with "security.voter"'); } - $container->getDefinition('security.access.decision_manager')->addMethodCall('setVoters', array(array_values($voters))); + $container->getDefinition('security.access.decision_manager')->addMethodCall('setVoters', array(array_values($voters))); } } diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index cf724e840e..4d247f543c 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -513,7 +513,7 @@ class Table */ private function calculateColumnsWidth($rows) { - for ($column = 0; $column < $this->numberOfColumns; $column++) { + for ($column = 0; $column < $this->numberOfColumns; ++$column) { $lengths = array(); foreach ($rows as $row) { if ($row instanceof TableSeparator) { diff --git a/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/src/Symfony/Component/Console/Tests/Command/CommandTest.php index 4b465f8aaa..d1d65186e1 100644 --- a/src/Symfony/Component/Console/Tests/Command/CommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/CommandTest.php @@ -365,8 +365,7 @@ class CommandTest extends \PHPUnit_Framework_TestCase // scope. function createClosure() { - return function(InputInterface $input, OutputInterface $output) - { + return function (InputInterface $input, OutputInterface $output) { $output->writeln($this instanceof Command ? 'bound to the command' : 'not bound to the command'); }; } diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 29cfa7c230..c1c6f80f70 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -868,8 +868,8 @@ EOF; if (count($scopes = $this->container->getScopes(false)) > 0) { $code .= "\n"; - $code .= " \$this->scopes = ".$this->dumpValue($scopes).";\n"; - $code .= " \$this->scopeChildren = ".$this->dumpValue($this->container->getScopeChildren(false)).";\n"; + $code .= ' $this->scopes = '.$this->dumpValue($scopes).";\n"; + $code .= ' $this->scopeChildren = '.$this->dumpValue($this->container->getScopeChildren(false)).";\n"; } $code .= $this->addMethodMap(); @@ -914,8 +914,8 @@ EOF; $code .= "\n"; if (count($scopes = $this->container->getScopes(false)) > 0) { - $code .= " \$this->scopes = ".$this->dumpValue($scopes).";\n"; - $code .= " \$this->scopeChildren = ".$this->dumpValue($this->container->getScopeChildren(false)).";\n"; + $code .= ' $this->scopes = '.$this->dumpValue($scopes).";\n"; + $code .= ' $this->scopeChildren = '.$this->dumpValue($this->container->getScopeChildren(false)).";\n"; } else { $code .= " \$this->scopes = array();\n"; $code .= " \$this->scopeChildren = array();\n"; diff --git a/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php index e13415db86..fb7be87ead 100644 --- a/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Form\Tests; use Symfony\Component\Form\FormError; -use Symfony\Component\Form\Tests\Fixtures\AlternatingRowType; use Symfony\Component\Security\Csrf\CsrfToken; abstract class AbstractDivLayoutTest extends AbstractLayoutTest diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php index 39e367de76..81010ae50f 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; use Symfony\Component\Form\Form; use Symfony\Component\Form\Tests\Fixtures\Author; -use Symfony\Component\Form\Tests\Fixtures\AuthorType; class CollectionTypeTest extends \Symfony\Component\Form\Test\TypeTestCase { diff --git a/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php index db29530564..fc29d371ed 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php @@ -57,7 +57,7 @@ class DirectoryLoaderTest extends AbstractAnnotationLoaderTest $this->assertCount(3, $routes, 'Three routes are loaded'); $this->assertContainsOnly('Symfony\Component\Routing\Route', $routes); - for ($i = 1; $i <= 3; $i++) { + for ($i = 1; $i <= 3; ++$i) { $this->assertSame('/route/'.$i, $routes['route'.$i]->getPath()); } }