From 673bbb8a8e3277a059fa213219516ca86b897eb0 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 11 Mar 2012 18:00:25 +0100 Subject: [PATCH] fixed CS --- .../Doctrine/ContainerAwareEventManager.php | 1 - .../SecurityBundle/Command/InitAclCommand.php | 4 ++-- .../EventListener/AclSchemaListener.php | 10 ++++----- .../Resources/config/security_acl_dbal.xml | 2 +- .../Controller/LoginController.php | 1 - .../Form/UserLoginFormType.php | 1 + .../EventDispatcherInterface.php | 2 +- .../Component/Security/Acl/Dbal/Schema.php | 21 +++++++++---------- .../Profiler/FileProfilerStorageTest.php | 1 - .../Profiler/MemcacheProfilerStorageTest.php | 1 - .../Profiler/MemcachedProfilerStorageTest.php | 1 - .../Profiler/RedisProfilerStorageTest.php | 1 - .../Profiler/SqliteProfilerStorageTest.php | 1 - 13 files changed, 20 insertions(+), 27 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php b/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php index 1783435e83..871a2d95c0 100644 --- a/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php +++ b/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php @@ -13,7 +13,6 @@ namespace Symfony\Bridge\Doctrine; use Doctrine\Common\EventArgs; use Doctrine\Common\EventManager; -use Doctrine\Common\EventSubscriber; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php index 5c14a3b58e..b717f97c86 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php @@ -59,8 +59,8 @@ EOT try { $schema->addToSchema($connection->getSchemaManager()->createSchema()); } catch (SchemaException $e) { - $output->writeln("Aborting: " . $e->getMessage()); - + $output->writeln("Aborting: " . $e->getMessage()); + return; } diff --git a/src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.php b/src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.php index 2e8b191676..198609d9bd 100644 --- a/src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.php +++ b/src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.php @@ -14,10 +14,10 @@ namespace Symfony\Bundle\SecurityBundle\EventListener; use Symfony\Component\DependencyInjection\ContainerInterface; use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs; -/** - * Merges ACL schema into the given schema. - * - * @author Johannes M. Schmitt +/** + * Merges ACL schema into the given schema. + * + * @author Johannes M. Schmitt */ class AclSchemaListener { @@ -33,4 +33,4 @@ class AclSchemaListener $schema = $args->getSchema(); $this->container->get('security.acl.dbal.schema')->addToSchema($schema); } -} \ No newline at end of file +} diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml index 6a921159b7..aac84a3ce5 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml +++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml @@ -7,7 +7,7 @@ Symfony\Component\Security\Acl\Dbal\MutableAclProvider Symfony\Component\Security\Acl\Dbal\Schema - Symfony\Bundle\SecurityBundle\EventListener\AclSchemaListener + Symfony\Bundle\SecurityBundle\EventListener\AclSchemaListener diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php index a7482c67ec..d25bebf88e 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php @@ -13,7 +13,6 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBun use Symfony\Component\DependencyInjection\ContainerAware; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\SecurityContextInterface; use Symfony\Component\Security\Core\Exception\AccessDeniedException; class LoginController extends ContainerAware diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php index c0b7959324..d1e9252018 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php @@ -81,6 +81,7 @@ class UserLoginFormType extends AbstractType /* Note: the form's intention must correspond to that for the form login * listener in order for the CSRF token to validate successfully. */ + return array( 'intention' => 'authenticate', ); diff --git a/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php b/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php index f531ca502e..d47ee66aa2 100644 --- a/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php +++ b/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php @@ -32,7 +32,7 @@ interface EventDispatcherInterface * If not supplied, an empty Event instance is created. * * @return Event - * + * * @api */ function dispatch($eventName, Event $event = null); diff --git a/src/Symfony/Component/Security/Acl/Dbal/Schema.php b/src/Symfony/Component/Security/Acl/Dbal/Schema.php index 97376acac6..9ff3521044 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/Schema.php +++ b/src/Symfony/Component/Security/Acl/Dbal/Schema.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Security\Acl\Dbal; use Doctrine\DBAL\Schema\Schema as BaseSchema; -use Doctrine\DBAL\Schema\SchemaConfig; use Doctrine\DBAL\Connection; /** @@ -50,16 +49,16 @@ final class Schema extends BaseSchema * * @param BaseSchema $schema */ - public function addToSchema(BaseSchema $schema) - { - foreach ($this->getTables() as $table) { - $schema->_addTable($table); - } - - foreach ($this->getSequences() as $sequence) { - $schema->_addSequence($sequence); - } - } + public function addToSchema(BaseSchema $schema) + { + foreach ($this->getTables() as $table) { + $schema->_addTable($table); + } + + foreach ($this->getSequences() as $sequence) { + $schema->_addSequence($sequence); + } + } /** * Adds the class table to the schema diff --git a/tests/Symfony/Tests/Component/HttpKernel/Profiler/FileProfilerStorageTest.php b/tests/Symfony/Tests/Component/HttpKernel/Profiler/FileProfilerStorageTest.php index 4941f701ba..2c0fd65b5c 100644 --- a/tests/Symfony/Tests/Component/HttpKernel/Profiler/FileProfilerStorageTest.php +++ b/tests/Symfony/Tests/Component/HttpKernel/Profiler/FileProfilerStorageTest.php @@ -12,7 +12,6 @@ namespace Symfony\Tests\Component\HttpKernel\Profiler; use Symfony\Component\HttpKernel\Profiler\FileProfilerStorage; -use Symfony\Component\HttpKernel\Profiler\Profile; class FileProfilerStorageTest extends AbstractProfilerStorageTest { diff --git a/tests/Symfony/Tests/Component/HttpKernel/Profiler/MemcacheProfilerStorageTest.php b/tests/Symfony/Tests/Component/HttpKernel/Profiler/MemcacheProfilerStorageTest.php index 8513e6ce28..ca9483ab14 100644 --- a/tests/Symfony/Tests/Component/HttpKernel/Profiler/MemcacheProfilerStorageTest.php +++ b/tests/Symfony/Tests/Component/HttpKernel/Profiler/MemcacheProfilerStorageTest.php @@ -12,7 +12,6 @@ namespace Symfony\Tests\Component\HttpKernel\Profiler; use Symfony\Component\HttpKernel\Profiler\MemcacheProfilerStorage; -use Symfony\Component\HttpKernel\Profiler\Profile; class DummyMemcacheProfilerStorage extends MemcacheProfilerStorage { diff --git a/tests/Symfony/Tests/Component/HttpKernel/Profiler/MemcachedProfilerStorageTest.php b/tests/Symfony/Tests/Component/HttpKernel/Profiler/MemcachedProfilerStorageTest.php index c936874749..f9bb91fdf9 100644 --- a/tests/Symfony/Tests/Component/HttpKernel/Profiler/MemcachedProfilerStorageTest.php +++ b/tests/Symfony/Tests/Component/HttpKernel/Profiler/MemcachedProfilerStorageTest.php @@ -12,7 +12,6 @@ namespace Symfony\Tests\Component\HttpKernel\Profiler; use Symfony\Component\HttpKernel\Profiler\MemcachedProfilerStorage; -use Symfony\Component\HttpKernel\Profiler\Profile; class DummyMemcachedProfilerStorage extends MemcachedProfilerStorage { diff --git a/tests/Symfony/Tests/Component/HttpKernel/Profiler/RedisProfilerStorageTest.php b/tests/Symfony/Tests/Component/HttpKernel/Profiler/RedisProfilerStorageTest.php index d48097b2f0..bd8f9357ab 100644 --- a/tests/Symfony/Tests/Component/HttpKernel/Profiler/RedisProfilerStorageTest.php +++ b/tests/Symfony/Tests/Component/HttpKernel/Profiler/RedisProfilerStorageTest.php @@ -12,7 +12,6 @@ namespace Symfony\Tests\Component\HttpKernel\Profiler; use Symfony\Component\HttpKernel\Profiler\RedisProfilerStorage; -use Symfony\Component\HttpKernel\Profiler\Profile; class DummyRedisProfilerStorage extends RedisProfilerStorage { diff --git a/tests/Symfony/Tests/Component/HttpKernel/Profiler/SqliteProfilerStorageTest.php b/tests/Symfony/Tests/Component/HttpKernel/Profiler/SqliteProfilerStorageTest.php index 7ac78a9ed8..22527fa104 100644 --- a/tests/Symfony/Tests/Component/HttpKernel/Profiler/SqliteProfilerStorageTest.php +++ b/tests/Symfony/Tests/Component/HttpKernel/Profiler/SqliteProfilerStorageTest.php @@ -12,7 +12,6 @@ namespace Symfony\Tests\Component\HttpKernel\Profiler; use Symfony\Component\HttpKernel\Profiler\SqliteProfilerStorage; -use Symfony\Component\HttpKernel\Profiler\Profile; class SqliteProfilerStorageTest extends AbstractProfilerStorageTest {