From 51312d31cc0ab034c6a780d02b6b31f51d7136ec Mon Sep 17 00:00:00 2001 From: Disquedur Date: Wed, 22 Oct 2014 20:27:13 +0200 Subject: [PATCH] Remove aligned '=>' and '=' --- UPGRADE-2.1.md | 2 +- .../DataCollector/DoctrineDataCollector.php | 4 +- .../AbstractDoctrineExtension.php | 6 +- .../Doctrine/Form/Type/DoctrineType.php | 14 +- .../RememberMe/DoctrineTokenProvider.php | 24 +-- .../DataFixtures/ContainerAwareLoaderTest.php | 4 +- .../Doctrine/Tests/Logger/DbalLoggerTest.php | 6 +- .../Bridge/Monolog/Handler/DebugHandler.php | 8 +- .../Tests/Processor/WebProcessorTest.php | 8 +- .../DataCollector/PropelDataCollector.php | 20 +-- .../Form/ChoiceList/ModelChoiceList.php | 13 +- .../Bridge/Propel1/Form/PropelTypeGuesser.php | 8 +- .../Bridge/Propel1/Form/Type/ModelType.php | 20 +-- .../Bridge/Propel1/Logger/PropelLogger.php | 4 +- .../Security/User/PropelUserProvider.php | 2 +- .../DataCollector/PropelDataCollectorTest.php | 24 +-- .../Propel1/Tests/Fixtures/ItemQuery.php | 12 +- .../CollectionToArrayTransformerTest.php | 6 +- .../Instantiator/RuntimeInstantiatorTest.php | 6 +- .../DataCollector/MessageDataCollector.php | 4 +- .../Bridge/Twig/Extension/CodeExtension.php | 2 +- .../Command/AssetsInstallCommand.php | 2 +- .../Command/CacheClearCommand.php | 8 +- .../Command/RouterDebugCommand.php | 4 +- .../DependencyInjection/Configuration.php | 2 +- .../FrameworkExtension.php | 18 +-- .../Routing/RedirectableUrlMatcher.php | 12 +- .../Templating/Helper/CodeHelper.php | 2 +- .../Templating/TemplateReference.php | 8 +- .../Controller/ControllerNameParserTest.php | 2 +- .../DependencyInjection/ConfigurationTest.php | 52 +++---- .../DependencyInjection/Fixtures/php/full.php | 46 +++--- .../Fixtures/php/templating_url_package.php | 4 +- .../Fixtures/php/validation_annotations.php | 2 +- .../FrameworkExtensionTest.php | 10 +- .../EventListener/TestSessionListenerTest.php | 2 +- .../Controller/SubRequestController.php | 2 +- .../Routing/RedirectableUrlMatcherTest.php | 24 +-- .../Tests/Routing/RouterTest.php | 16 +- .../Tests/Translation/TranslatorTest.php | 4 +- .../Translation/PhpStringTokenParser.php | 14 +- .../Translation/Translator.php | 2 +- .../DataCollector/SecurityDataCollector.php | 24 +-- .../Security/Factory/AbstractFactory.php | 22 +-- .../DependencyInjection/SecurityExtension.php | 14 +- .../CompleteConfigurationTest.php | 4 +- .../Security/Factory/AbstractFactoryTest.php | 2 +- .../Controller/LoginController.php | 2 +- .../Controller/LocalizedController.php | 2 +- .../Controller/LoginController.php | 2 +- .../Tests/Functional/SwitchUserTest.php | 6 +- .../Controller/ExceptionController.php | 8 +- .../DependencyInjection/TwigExtension.php | 2 +- .../php/customTemplateEscapingGuesser.php | 2 +- .../Fixtures/php/extra.php | 2 +- .../DependencyInjection/Fixtures/php/full.php | 16 +- .../DependencyInjection/TwigExtensionTest.php | 22 +-- .../Controller/ExceptionController.php | 8 +- .../Controller/ProfilerController.php | 110 +++++++------- .../Controller/RouterController.php | 4 +- .../EventListener/WebDebugToolbarListener.php | 2 +- .../Resources/views/Collector/time.html.twig | 40 ++--- src/Symfony/Component/BrowserKit/Client.php | 2 +- src/Symfony/Component/BrowserKit/Cookie.php | 26 ++-- src/Symfony/Component/BrowserKit/Response.php | 2 +- .../Component/BrowserKit/Tests/ClientTest.php | 24 +-- .../BrowserKit/Tests/ResponseTest.php | 4 +- .../ClassLoader/ApcUniversalClassLoader.php | 4 +- .../ClassLoader/ClassMapGenerator.php | 2 +- src/Symfony/Component/ClassLoader/README.md | 6 +- .../Tests/ClassMapGeneratorTest.php | 30 ++-- .../ClassLoader/UniversalClassLoader.php | 4 +- .../Config/Definition/Builder/NodeBuilder.php | 14 +- .../Config/Tests/Definition/ArrayNodeTest.php | 6 +- src/Symfony/Component/Console/Application.php | 6 +- .../Console/Descriptor/JsonDescriptor.php | 28 ++-- .../Formatter/OutputFormatterStyle.php | 42 +++--- .../Console/Helper/ProgressHelper.php | 32 ++-- .../Component/Console/Input/InputArgument.php | 4 +- .../Console/Input/InputDefinition.php | 6 +- .../Component/Console/Input/InputOption.php | 8 +- .../Console/Output/OutputInterface.php | 12 +- .../Component/CssSelector/Parser/Token.php | 10 +- .../Extension/AttributeMatchingExtension.php | 14 +- .../XPath/Extension/FunctionExtension.php | 10 +- .../XPath/Extension/HtmlExtension.php | 12 +- .../XPath/Extension/NodeExtension.php | 20 +-- .../XPath/Extension/PseudoClassExtension.php | 14 +- src/Symfony/Component/Debug/ErrorHandler.php | 24 +-- .../Debug/Exception/FlattenException.php | 32 ++-- .../Component/Debug/ExceptionHandler.php | 2 +- .../Tests/Exception/FlattenExceptionTest.php | 16 +- .../Compiler/AnalyzeServiceReferencesPass.php | 2 +- .../Compiler/CheckCircularReferencesPass.php | 4 +- .../DependencyInjection/Container.php | 10 +- .../ContainerInterface.php | 8 +- .../Dumper/GraphvizDumper.php | 4 +- .../DependencyInjection/Dumper/PhpDumper.php | 14 +- .../Tests/ContainerBuilderTest.php | 10 +- .../Tests/Dumper/GraphvizDumperTest.php | 4 +- .../Tests/Fixtures/containers/container8.php | 6 +- .../RealServiceInstantiatorTest.php | 6 +- .../LazyProxy/PhpDumper/NullDumperTest.php | 2 +- .../Tests/Loader/IniFileLoaderTest.php | 2 +- .../Component/DomCrawler/Tests/FormTest.php | 4 +- .../Tests/EventDispatcherTest.php | 2 +- .../Finder/Adapter/AbstractAdapter.php | 26 ++-- .../Finder/Expression/Expression.php | 2 +- .../Component/Finder/Expression/Regex.php | 10 +- src/Symfony/Component/Finder/Finder.php | 34 ++--- .../Finder/Iterator/FilePathsIterator.php | 2 +- .../Iterator/FileTypeFilterIterator.php | 2 +- .../Finder/Iterator/PathFilterIterator.php | 2 +- .../Component/Finder/Shell/Command.php | 2 +- src/Symfony/Component/Finder/Shell/Shell.php | 8 +- .../Component/Finder/Tests/FinderTest.php | 2 +- .../FilecontentFilterIteratorTest.php | 24 +-- .../Finder/Tests/Iterator/MockSplFileInfo.php | 22 +-- .../Tests/Iterator/PathFilterIteratorTest.php | 24 +-- .../DateTimeToArrayTransformer.php | 24 +-- .../NumberToLocalizedStringTransformer.php | 10 +- .../Form/Extension/Core/Type/BaseType.php | 34 ++--- .../Form/Extension/Core/Type/CheckboxType.php | 6 +- .../Form/Extension/Core/Type/ChoiceType.php | 28 ++-- .../Extension/Core/Type/CollectionType.php | 12 +- .../Form/Extension/Core/Type/DateTimeType.php | 28 ++-- .../Form/Extension/Core/Type/DateType.php | 30 ++-- .../Form/Extension/Core/Type/FileType.php | 2 +- .../Form/Extension/Core/Type/FormType.php | 56 +++---- .../Form/Extension/Core/Type/HiddenType.php | 4 +- .../Form/Extension/Core/Type/IntegerType.php | 6 +- .../Form/Extension/Core/Type/MoneyType.php | 8 +- .../Form/Extension/Core/Type/NumberType.php | 6 +- .../Form/Extension/Core/Type/PasswordType.php | 2 +- .../Form/Extension/Core/Type/PercentType.php | 4 +- .../Form/Extension/Core/Type/RepeatedType.php | 16 +- .../Form/Extension/Core/Type/TimeType.php | 30 ++-- .../Csrf/Type/FormTypeCsrfExtension.php | 10 +- .../Type/FormTypeValidatorExtension.php | 12 +- src/Symfony/Component/Form/FormBuilder.php | 2 +- src/Symfony/Component/Form/FormFactory.php | 2 +- src/Symfony/Component/Form/FormView.php | 2 +- .../Component/Form/NativeRequestHandler.php | 8 +- .../Form/Tests/AbstractDivLayoutTest.php | 2 +- .../Form/Tests/AbstractTableLayoutTest.php | 4 +- .../Core/EventListener/TrimListenerTest.php | 2 +- .../Extension/Core/Type/ChoiceTypeTest.php | 38 ++--- .../Core/Type/CollectionTypeTest.php | 18 +-- .../Extension/Core/Type/RepeatedTypeTest.php | 18 +-- .../HttpFoundation/File/UploadedFile.php | 10 +- .../Component/HttpFoundation/FileBag.php | 8 +- .../Component/HttpFoundation/Request.php | 74 ++++----- .../Component/HttpFoundation/Response.php | 4 +- .../HttpFoundation/ResponseHeaderBag.php | 10 +- .../Storage/Handler/MongoDbSessionHandler.php | 2 +- .../Storage/Handler/PdoSessionHandler.php | 2 +- .../Tests/ApacheRequestTest.php | 4 +- .../HttpFoundation/Tests/HeaderBagTest.php | 4 +- .../HttpFoundation/Tests/ParameterBagTest.php | 4 +- .../HttpFoundation/Tests/RequestTest.php | 62 ++++---- .../HttpFoundation/Tests/ResponseTest.php | 20 +-- .../Handler/MongoDbSessionHandlerTest.php | 2 +- .../DataCollector/ConfigDataCollector.php | 30 ++-- .../DataCollector/EventDataCollector.php | 2 +- .../DataCollector/LoggerDataCollector.php | 4 +- .../DataCollector/MemoryDataCollector.php | 2 +- .../DataCollector/RequestDataCollector.php | 50 +++--- .../DataCollector/RouterDataCollector.php | 4 +- .../DataCollector/TimeDataCollector.php | 2 +- .../Debug/TraceableEventDispatcher.php | 12 +- .../EventListener/ExceptionListener.php | 6 +- .../HttpKernel/HttpCache/HttpCache.php | 12 +- src/Symfony/Component/HttpKernel/Kernel.php | 26 ++-- .../Profiler/BaseMemcacheProfilerStorage.php | 24 +-- .../Profiler/FileProfilerStorage.php | 22 +-- .../Profiler/PdoProfilerStorage.php | 14 +- .../Profiler/RedisProfilerStorage.php | 22 +-- .../Tests/HttpCache/HttpCacheTest.php | 48 +++--- .../HttpCache/TestMultipleHttpKernel.php | 10 +- .../Profiler/AbstractProfilerStorageTest.php | 2 +- .../Component/Intl/Collator/Collator.php | 2 +- .../DateFormat/FullTransformer.php | 32 ++-- .../DateFormat/TimeZoneTransformer.php | 4 +- .../Intl/DateFormatter/IntlDateFormatter.php | 16 +- src/Symfony/Component/Intl/Locale/Locale.php | 14 +- .../Intl/NumberFormatter/NumberFormatter.php | 142 +++++++++--------- .../DateFormatter/IntlDateFormatterTest.php | 16 +- .../Intl/Tests/Locale/LocaleTest.php | 4 +- .../Generator/Dumper/PhpGeneratorDumper.php | 2 +- .../Routing/Loader/AnnotationClassLoader.php | 12 +- .../Matcher/Dumper/ApacheMatcherDumper.php | 8 +- .../Matcher/Dumper/PhpMatcherDumper.php | 2 +- .../Routing/Matcher/TraceableUrlMatcher.php | 8 +- .../Component/Routing/Matcher/UrlMatcher.php | 6 +- src/Symfony/Component/Routing/Route.php | 12 +- src/Symfony/Component/Routing/Router.php | 26 ++-- .../Tests/Fixtures/RedirectableUrlMatcher.php | 4 +- .../Dumper/PhpGeneratorDumperTest.php | 4 +- .../Loader/AnnotationClassLoaderTest.php | 12 +- .../Component/Routing/Tests/RouteTest.php | 2 +- .../Acl/Domain/PermissionGrantingStrategy.php | 6 +- .../Acl/Permission/BasicPermissionMap.php | 16 +- .../Security/Acl/Permission/MaskBuilder.php | 40 ++--- .../Acl/Resources/bin/generateSql.php | 16 +- .../Authorization/Voter/VoterInterface.php | 2 +- .../Core/SecurityContextInterface.php | 4 +- .../DefaultAuthenticationFailureHandler.php | 10 +- .../DefaultAuthenticationSuccessHandler.php | 10 +- .../AbstractAuthenticationListener.php | 16 +- .../AnonymousAuthenticationListener.php | 4 +- .../Security/Http/Firewall/LogoutListener.php | 4 +- ...namePasswordFormAuthenticationListener.php | 6 +- .../Session/SessionAuthenticationStrategy.php | 6 +- .../Core/User/InMemoryUserProviderTest.php | 4 +- .../Constraints/UserPasswordValidatorTest.php | 2 +- .../BasicAuthenticationListenerTest.php | 6 +- .../Http/Firewall/LogoutListenerTest.php | 6 +- ...istentTokenBasedRememberMeServicesTest.php | 2 +- .../TokenBasedRememberMeServicesTest.php | 2 +- .../Serializer/Encoder/JsonDecode.php | 4 +- .../Component/Serializer/Serializer.php | 4 +- .../Component/Templating/PhpEngine.php | 8 +- .../Templating/TemplateReference.php | 2 +- .../Translation/Catalogue/DiffOperation.php | 4 +- .../Translation/Catalogue/MergeOperation.php | 4 +- .../Translation/Dumper/MoFileDumper.php | 14 +- .../Translation/Loader/CsvFileLoader.php | 4 +- .../Loader/schema/dic/xliff-core/xml.xsd | 2 +- .../Tests/Dumper/XliffFileDumperTest.php | 4 +- .../Component/Validator/Constraints/File.php | 12 +- .../Validator/Constraints/ImageValidator.php | 10 +- .../Component/Validator/Constraints/Regex.php | 6 +- .../Validator/Constraints/TypeValidator.php | 2 +- src/Symfony/Component/Validator/README.md | 10 +- .../Tests/Constraints/FileValidatorTest.php | 8 +- src/Symfony/Component/Yaml/Escaper.php | 2 +- src/Symfony/Component/Yaml/Parser.php | 10 +- .../Fixtures/YtsSpecificationExamples.yml | 4 +- .../Component/Yaml/Tests/ParserTest.php | 2 +- 239 files changed, 1454 insertions(+), 1455 deletions(-) diff --git a/UPGRADE-2.1.md b/UPGRADE-2.1.md index 64f98af7b8..5fdae5fedc 100644 --- a/UPGRADE-2.1.md +++ b/UPGRADE-2.1.md @@ -1107,7 +1107,7 @@ ```php $view->vars = array_replace($view->vars, array( - 'help' => 'A text longer than six characters', + 'help' => 'A text longer than six characters', 'error_class' => 'max_length_error', )); ``` diff --git a/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php b/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php index 7f91749c74..89137d1055 100644 --- a/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php +++ b/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php @@ -59,9 +59,9 @@ class DoctrineDataCollector extends DataCollector } $this->data = array( - 'queries' => $queries, + 'queries' => $queries, 'connections' => $this->connections, - 'managers' => $this->managers, + 'managers' => $this->managers, ); } diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php index a11acfc45b..745a0a87d4 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php @@ -52,7 +52,7 @@ abstract class AbstractDoctrineExtension extends Extension foreach (array_keys($container->getParameter('kernel.bundles')) as $bundle) { if (!isset($objectManager['mappings'][$bundle])) { $objectManager['mappings'][$bundle] = array( - 'mapping' => true, + 'mapping' => true, 'is_bundle' => true, ); } @@ -65,8 +65,8 @@ abstract class AbstractDoctrineExtension extends Extension } $mappingConfig = array_replace(array( - 'dir' => false, - 'type' => false, + 'dir' => false, + 'type' => false, 'prefix' => false, ), (array) $mappingConfig); diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php index 7a027df1e7..aac695c0b3 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php @@ -160,13 +160,13 @@ abstract class DoctrineType extends AbstractType }; $resolver->setDefaults(array( - 'em' => null, - 'property' => null, - 'query_builder' => null, - 'loader' => $loader, - 'choices' => null, - 'choice_list' => $choiceList, - 'group_by' => null, + 'em' => null, + 'property' => null, + 'query_builder' => null, + 'loader' => $loader, + 'choices' => null, + 'choice_list' => $choiceList, + 'group_by' => null, )); $resolver->setRequired(array('class')); diff --git a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php index d2e4b00726..d62b54478b 100644 --- a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php +++ b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php @@ -63,7 +63,7 @@ class DoctrineTokenProvider implements TokenProviderInterface $sql = 'SELECT class, username, value, lastUsed' .' FROM rememberme_token WHERE series=:series'; $paramValues = array('series' => $series); - $paramTypes = array('series' => \PDO::PARAM_STR); + $paramTypes = array('series' => \PDO::PARAM_STR); $stmt = $this->conn->executeQuery($sql, $paramValues, $paramTypes); $row = $stmt->fetch(\PDO::FETCH_ASSOC); if ($row) { @@ -85,7 +85,7 @@ class DoctrineTokenProvider implements TokenProviderInterface { $sql = 'DELETE FROM rememberme_token WHERE series=:series'; $paramValues = array('series' => $series); - $paramTypes = array('series' => \PDO::PARAM_STR); + $paramTypes = array('series' => \PDO::PARAM_STR); $this->conn->executeUpdate($sql, $paramValues, $paramTypes); } @@ -96,12 +96,12 @@ class DoctrineTokenProvider implements TokenProviderInterface { $sql = 'UPDATE rememberme_token SET value=:value, lastUsed=:lastUsed' .' WHERE series=:series'; - $paramValues = array('value' => $tokenValue, + $paramValues = array('value' => $tokenValue, 'lastUsed' => $lastUsed, - 'series' => $series,); - $paramTypes = array('value' => \PDO::PARAM_STR, + 'series' => $series,); + $paramTypes = array('value' => \PDO::PARAM_STR, 'lastUsed' => DoctrineType::DATETIME, - 'series' => \PDO::PARAM_STR,); + 'series' => \PDO::PARAM_STR,); $updated = $this->conn->executeUpdate($sql, $paramValues, $paramTypes); if ($updated < 1) { throw new TokenNotFoundException('No token found.'); @@ -116,15 +116,15 @@ class DoctrineTokenProvider implements TokenProviderInterface $sql = 'INSERT INTO rememberme_token' .' (class, username, series, value, lastUsed)' .' VALUES (:class, :username, :series, :value, :lastUsed)'; - $paramValues = array('class' => $token->getClass(), + $paramValues = array('class' => $token->getClass(), 'username' => $token->getUsername(), - 'series' => $token->getSeries(), - 'value' => $token->getTokenValue(), + 'series' => $token->getSeries(), + 'value' => $token->getTokenValue(), 'lastUsed' => $token->getLastUsed(),); - $paramTypes = array('class' => \PDO::PARAM_STR, + $paramTypes = array('class' => \PDO::PARAM_STR, 'username' => \PDO::PARAM_STR, - 'series' => \PDO::PARAM_STR, - 'value' => \PDO::PARAM_STR, + 'series' => \PDO::PARAM_STR, + 'value' => \PDO::PARAM_STR, 'lastUsed' => DoctrineType::DATETIME,); $this->conn->executeUpdate($sql, $paramValues, $paramTypes); } diff --git a/src/Symfony/Bridge/Doctrine/Tests/DataFixtures/ContainerAwareLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/DataFixtures/ContainerAwareLoaderTest.php index 52d653bdd9..914c8938db 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DataFixtures/ContainerAwareLoaderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DataFixtures/ContainerAwareLoaderTest.php @@ -30,8 +30,8 @@ class ContainerAwareLoaderTest extends \PHPUnit_Framework_TestCase public function testShouldSetContainerOnContainerAwareFixture() { $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); - $loader = new ContainerAwareLoader($container); - $fixture = new ContainerAwareFixture(); + $loader = new ContainerAwareLoader($container); + $fixture = new ContainerAwareFixture(); $loader->addFixture($fixture); diff --git a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php index 970a13e827..464201a8ad 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php @@ -68,7 +68,7 @@ class DbalLoggerTest extends \PHPUnit_Framework_TestCase ; $dbalLogger->startQuery('SQL', array( - 'utf8' => 'foo', + 'utf8' => 'foo', 'nonutf8' => "\x7F\xFF", )); } @@ -97,7 +97,7 @@ class DbalLoggerTest extends \PHPUnit_Framework_TestCase $dbalLogger->startQuery('SQL', array( 'short' => $shortString, - 'long' => $longString, + 'long' => $longString, )); } @@ -135,7 +135,7 @@ class DbalLoggerTest extends \PHPUnit_Framework_TestCase $dbalLogger->startQuery('SQL', array( 'short' => $shortString, - 'long' => $longString, + 'long' => $longString, )); } } diff --git a/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php b/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php index 7ba04ab942..c959a5a94f 100644 --- a/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php @@ -30,11 +30,11 @@ class DebugHandler extends TestHandler implements DebugLoggerInterface $records = array(); foreach ($this->records as $record) { $records[] = array( - 'timestamp' => $record['datetime']->getTimestamp(), - 'message' => $record['message'], - 'priority' => $record['level'], + 'timestamp' => $record['datetime']->getTimestamp(), + 'message' => $record['message'], + 'priority' => $record['level'], 'priorityName' => $record['level_name'], - 'context' => $record['context'], + 'context' => $record['context'], ); } diff --git a/src/Symfony/Bridge/Monolog/Tests/Processor/WebProcessorTest.php b/src/Symfony/Bridge/Monolog/Tests/Processor/WebProcessorTest.php index bfe3e515a4..e41a881ac7 100644 --- a/src/Symfony/Bridge/Monolog/Tests/Processor/WebProcessorTest.php +++ b/src/Symfony/Bridge/Monolog/Tests/Processor/WebProcessorTest.php @@ -28,11 +28,11 @@ class WebProcessorTest extends \PHPUnit_Framework_TestCase public function testUsesRequestServerData() { $server = array( - 'REQUEST_URI' => 'A', - 'REMOTE_ADDR' => 'B', + 'REQUEST_URI' => 'A', + 'REMOTE_ADDR' => 'B', 'REQUEST_METHOD' => 'C', - 'SERVER_NAME' => 'D', - 'HTTP_REFERER' => 'E', + 'SERVER_NAME' => 'D', + 'HTTP_REFERER' => 'E', ); $request = new Request(); diff --git a/src/Symfony/Bridge/Propel1/DataCollector/PropelDataCollector.php b/src/Symfony/Bridge/Propel1/DataCollector/PropelDataCollector.php index bbb15fb9a0..dfa12fe78b 100644 --- a/src/Symfony/Bridge/Propel1/DataCollector/PropelDataCollector.php +++ b/src/Symfony/Bridge/Propel1/DataCollector/PropelDataCollector.php @@ -55,8 +55,8 @@ class PropelDataCollector extends DataCollector public function collect(Request $request, Response $response, \Exception $exception = null) { $this->data = array( - 'queries' => $this->buildQueries(), - 'querycount' => $this->countQueries(), + 'queries' => $this->buildQueries(), + 'querycount' => $this->countQueries(), ); } @@ -118,16 +118,16 @@ class PropelDataCollector extends DataCollector $innerGlue = $this->propelConfiguration->getParameter('debugpdo.logging.innerglue', ': '); foreach ($this->logger->getQueries() as $q) { - $parts = explode($outerGlue, $q, 4); + $parts = explode($outerGlue, $q, 4); - $times = explode($innerGlue, $parts[0]); - $con = explode($innerGlue, $parts[2]); - $memories = explode($innerGlue, $parts[1]); + $times = explode($innerGlue, $parts[0]); + $con = explode($innerGlue, $parts[2]); + $memories = explode($innerGlue, $parts[1]); - $sql = trim($parts[3]); - $con = trim($con[1]); - $time = trim($times[1]); - $memory = trim($memories[1]); + $sql = trim($parts[3]); + $con = trim($con[1]); + $time = trim($times[1]); + $memory = trim($memories[1]); $queries[] = array('connection' => $con, 'sql' => $sql, 'time' => $time, 'memory' => $memory); } diff --git a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php index e39cc71d9e..c75e0ae5ca 100644 --- a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php +++ b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php @@ -14,7 +14,6 @@ namespace Symfony\Bridge\Propel1\Form\ChoiceList; use \ModelCriteria; use \BaseObject; use \Persistent; - use Symfony\Component\Form\Exception\StringCastException; use Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList; use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; @@ -86,9 +85,9 @@ class ModelChoiceList extends ObjectChoiceList */ public function __construct($class, $labelPath = null, $choices = null, $queryObject = null, $groupPath = null, $preferred = array(), PropertyAccessorInterface $propertyAccessor = null) { - $this->class = $class; + $this->class = $class; - $queryClass = $this->class.'Query'; + $queryClass = $this->class.'Query'; if (!class_exists($queryClass)) { if (empty($this->class)) { throw new MissingOptionsException('The "class" parameter is empty, you should provide the model class'); @@ -96,11 +95,11 @@ class ModelChoiceList extends ObjectChoiceList throw new InvalidOptionsException(sprintf('The query class "%s" is not found, you should provide the FQCN of the model class', $queryClass)); } - $query = new $queryClass(); + $query = new $queryClass(); - $this->query = $queryObject ?: $query; - $this->identifier = $this->query->getTableMap()->getPrimaryKeys(); - $this->loaded = is_array($choices) || $choices instanceof \Traversable; + $this->query = $queryObject ?: $query; + $this->identifier = $this->query->getTableMap()->getPrimaryKeys(); + $this->loaded = is_array($choices) || $choices instanceof \Traversable; if ($preferred instanceof ModelCriteria) { $this->preferredQuery = $preferred->mergeWith($this->query); diff --git a/src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php b/src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php index 6f6262089e..3db34b53e3 100644 --- a/src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php +++ b/src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php @@ -38,22 +38,22 @@ class PropelTypeGuesser implements FormTypeGuesserInterface if ($relation->getType() === \RelationMap::MANY_TO_ONE) { if (strtolower($property) === strtolower($relation->getName())) { return new TypeGuess('model', array( - 'class' => $relation->getForeignTable()->getClassName(), + 'class' => $relation->getForeignTable()->getClassName(), 'multiple' => false, ), Guess::HIGH_CONFIDENCE); } } elseif ($relation->getType() === \RelationMap::ONE_TO_MANY) { if (strtolower($property) === strtolower($relation->getPluralName())) { return new TypeGuess('model', array( - 'class' => $relation->getForeignTable()->getClassName(), + 'class' => $relation->getForeignTable()->getClassName(), 'multiple' => true, ), Guess::HIGH_CONFIDENCE); } } elseif ($relation->getType() === \RelationMap::MANY_TO_MANY) { if (strtolower($property) == strtolower($relation->getPluralName())) { return new TypeGuess('model', array( - 'class' => $relation->getLocalTable()->getClassName(), - 'multiple' => true, + 'class' => $relation->getLocalTable()->getClassName(), + 'multiple' => true, ), Guess::HIGH_CONFIDENCE); } } diff --git a/src/Symfony/Bridge/Propel1/Form/Type/ModelType.php b/src/Symfony/Bridge/Propel1/Form/Type/ModelType.php index 02090d3638..ca049b5bf2 100644 --- a/src/Symfony/Bridge/Propel1/Form/Type/ModelType.php +++ b/src/Symfony/Bridge/Propel1/Form/Type/ModelType.php @@ -84,16 +84,16 @@ class ModelType extends AbstractType }; $resolver->setDefaults(array( - 'template' => 'choice', - 'multiple' => false, - 'expanded' => false, - 'class' => null, - 'property' => null, - 'query' => null, - 'choices' => null, - 'choice_list' => $choiceList, - 'group_by' => null, - 'by_reference' => false, + 'template' => 'choice', + 'multiple' => false, + 'expanded' => false, + 'class' => null, + 'property' => null, + 'query' => null, + 'choices' => null, + 'choice_list' => $choiceList, + 'group_by' => null, + 'by_reference' => false, )); } diff --git a/src/Symfony/Bridge/Propel1/Logger/PropelLogger.php b/src/Symfony/Bridge/Propel1/Logger/PropelLogger.php index 91c0061f4c..6abe32c3ba 100644 --- a/src/Symfony/Bridge/Propel1/Logger/PropelLogger.php +++ b/src/Symfony/Bridge/Propel1/Logger/PropelLogger.php @@ -47,8 +47,8 @@ class PropelLogger */ public function __construct(LoggerInterface $logger = null, Stopwatch $stopwatch = null) { - $this->logger = $logger; - $this->queries = array(); + $this->logger = $logger; + $this->queries = array(); $this->stopwatch = $stopwatch; $this->isPrepared = false; } diff --git a/src/Symfony/Bridge/Propel1/Security/User/PropelUserProvider.php b/src/Symfony/Bridge/Propel1/Security/User/PropelUserProvider.php index 9efc0b34d2..ce016cc552 100644 --- a/src/Symfony/Bridge/Propel1/Security/User/PropelUserProvider.php +++ b/src/Symfony/Bridge/Propel1/Security/User/PropelUserProvider.php @@ -63,7 +63,7 @@ class PropelUserProvider implements UserProviderInterface public function loadUserByUsername($username) { $queryClass = $this->queryClass; - $query = $queryClass::create(); + $query = $queryClass::create(); if (null !== $this->property) { $filter = 'filterBy'.ucfirst($this->property); diff --git a/src/Symfony/Bridge/Propel1/Tests/DataCollector/PropelDataCollectorTest.php b/src/Symfony/Bridge/Propel1/Tests/DataCollector/PropelDataCollectorTest.php index 0d80b83c7a..756cbfa9f4 100644 --- a/src/Symfony/Bridge/Propel1/Tests/DataCollector/PropelDataCollectorTest.php +++ b/src/Symfony/Bridge/Propel1/Tests/DataCollector/PropelDataCollectorTest.php @@ -45,10 +45,10 @@ class PropelDataCollectorTest extends Propel1TestCase $this->assertEquals(array( array( - 'sql' => "SET NAMES 'utf8'", - 'time' => '0.000 sec', + 'sql' => "SET NAMES 'utf8'", + 'time' => '0.000 sec', 'connection' => 'default', - 'memory' => '1.4 MB', + 'memory' => '1.4 MB', ), ), $c->getQueries()); $this->assertEquals(1, $c->getQueryCount()); @@ -67,22 +67,22 @@ class PropelDataCollectorTest extends Propel1TestCase $this->assertEquals(array( array( - 'sql' => "SET NAMES 'utf8'", - 'time' => '0.000 sec', + 'sql' => "SET NAMES 'utf8'", + 'time' => '0.000 sec', 'connection' => 'default', - 'memory' => '1.4 MB', + 'memory' => '1.4 MB', ), array( - 'sql' => "SELECT tags.NAME, image.FILENAME FROM tags LEFT JOIN image ON tags.IMAGEID = image.ID WHERE image.ID = 12", - 'time' => '0.012 sec', + 'sql' => "SELECT tags.NAME, image.FILENAME FROM tags LEFT JOIN image ON tags.IMAGEID = image.ID WHERE image.ID = 12", + 'time' => '0.012 sec', 'connection' => 'default', - 'memory' => '2.4 MB', + 'memory' => '2.4 MB', ), array( - 'sql' => "INSERT INTO `table` (`some_array`) VALUES ('| 1 | 2 | 3 |')", - 'time' => '0.012 sec', + 'sql' => "INSERT INTO `table` (`some_array`) VALUES ('| 1 | 2 | 3 |')", + 'time' => '0.012 sec', 'connection' => 'default', - 'memory' => '2.4 MB', + 'memory' => '2.4 MB', ), ), $c->getQueries()); $this->assertEquals(3, $c->getQueryCount()); diff --git a/src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php b/src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php index 83955592a5..220f40525e 100644 --- a/src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php +++ b/src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php @@ -14,12 +14,12 @@ namespace Symfony\Bridge\Propel1\Tests\Fixtures; class ItemQuery { private $map = array( - 'id' => \PropelColumnTypes::INTEGER, - 'value' => \PropelColumnTypes::VARCHAR, - 'price' => \PropelColumnTypes::FLOAT, - 'is_active' => \PropelColumnTypes::BOOLEAN, - 'enabled' => \PropelColumnTypes::BOOLEAN_EMU, - 'updated_at' => \PropelColumnTypes::TIMESTAMP, + 'id' => \PropelColumnTypes::INTEGER, + 'value' => \PropelColumnTypes::VARCHAR, + 'price' => \PropelColumnTypes::FLOAT, + 'is_active' => \PropelColumnTypes::BOOLEAN, + 'enabled' => \PropelColumnTypes::BOOLEAN_EMU, + 'updated_at' => \PropelColumnTypes::TIMESTAMP, ); public static $result = array(); diff --git a/src/Symfony/Bridge/Propel1/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php b/src/Symfony/Bridge/Propel1/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php index 32d18404f9..3949b47807 100644 --- a/src/Symfony/Bridge/Propel1/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php +++ b/src/Symfony/Bridge/Propel1/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php @@ -93,10 +93,10 @@ class CollectionToArrayTransformerTest extends Propel1TestCase public function testReverseTransformWithData() { - $inputData = array('foo', 'bar'); + $inputData = array('foo', 'bar'); - $result = $this->transformer->reverseTransform($inputData); - $data = $result->getData(); + $result = $this->transformer->reverseTransform($inputData); + $data = $result->getData(); $this->assertInstanceOf('\PropelObjectCollection', $result); diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php index 5c976e7423..84790d8198 100644 --- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php +++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php @@ -40,9 +40,9 @@ class RuntimeInstantiatorTest extends \PHPUnit_Framework_TestCase public function testInstantiateProxy() { - $instance = new \stdClass(); - $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); - $definition = new Definition('stdClass'); + $instance = new \stdClass(); + $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); + $definition = new Definition('stdClass'); $instantiator = function () use ($instance) { return $instance; }; diff --git a/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php b/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php index 30185bc4e6..2e08c27353 100644 --- a/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php +++ b/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php @@ -50,10 +50,10 @@ class MessageDataCollector extends DataCollector // only collect when Swiftmailer has already been initialized if (class_exists('Swift_Mailer', false)) { $logger = $this->container->get('swiftmailer.plugin.messagelogger'); - $this->data['messages'] = $logger->getMessages(); + $this->data['messages'] = $logger->getMessages(); $this->data['messageCount'] = $logger->countMessages(); } else { - $this->data['messages'] = array(); + $this->data['messages'] = array(); $this->data['messageCount'] = 0; } diff --git a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php index 763f315f8a..0ec48ee036 100644 --- a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php @@ -96,7 +96,7 @@ class CodeExtension extends \Twig_Extension $formattedValue = sprintf("object(%s)", $item[1], $short); } elseif ('array' === $item[0]) { $formattedValue = sprintf("array(%s)", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); - } elseif ('string' === $item[0]) { + } elseif ('string' === $item[0]) { $formattedValue = sprintf("'%s'", htmlspecialchars($item[1], ENT_QUOTES, $this->charset)); } elseif ('null' === $item[0]) { $formattedValue = 'null'; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php index 48a8543689..f60867d771 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php @@ -87,7 +87,7 @@ EOT foreach ($this->getContainer()->get('kernel')->getBundles() as $bundle) { if (is_dir($originDir = $bundle->getPath().'/Resources/public')) { - $targetDir = $bundlesDir.preg_replace('/bundle$/', '', strtolower($bundle->getName())); + $targetDir = $bundlesDir.preg_replace('/bundle$/', '', strtolower($bundle->getName())); $output->writeln(sprintf('Installing assets for %s into %s', $bundle->getNamespace(), $targetDir)); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php index b7e4bfd0c6..0d2f8968d8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php @@ -54,8 +54,8 @@ EOF protected function execute(InputInterface $input, OutputInterface $output) { $realCacheDir = $this->getContainer()->getParameter('kernel.cache_dir'); - $oldCacheDir = $realCacheDir.'_old'; - $filesystem = $this->getContainer()->get('filesystem'); + $oldCacheDir = $realCacheDir.'_old'; + $filesystem = $this->getContainer()->get('filesystem'); if (!is_writable($realCacheDir)) { throw new \RuntimeException(sprintf('Unable to write in the "%s" directory', $realCacheDir)); @@ -132,7 +132,7 @@ EOF } // fix references to cached files with the real cache directory name - $search = array($warmupDir, str_replace('\\', '\\\\', $warmupDir)); + $search = array($warmupDir, str_replace('\\', '\\\\', $warmupDir)); $replace = str_replace('\\', '/', $realCacheDir); foreach (Finder::create()->files()->in($warmupDir) as $file) { $content = str_replace($search, $replace, file_get_contents($file)); @@ -140,7 +140,7 @@ EOF } // fix references to kernel/container related classes - $search = $tempKernel->getName().ucfirst($tempKernel->getEnvironment()); + $search = $tempKernel->getName().ucfirst($tempKernel->getEnvironment()); $replace = $realKernel->getName().ucfirst($realKernel->getEnvironment()); foreach (Finder::create()->files()->name($search.'*')->in($warmupDir) as $file) { $content = str_replace($search, $replace, file_get_contents($file)); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index d581af54f9..7bd026c6ae 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -99,8 +99,8 @@ EOF $maxHost = max($maxHost, strlen($host)); } - $format = '%-'.$maxName.'s %-'.$maxMethod.'s %-'.$maxScheme.'s %-'.$maxHost.'s %s'; - $formatHeader = '%-'.($maxName + 19).'s %-'.($maxMethod + 19).'s %-'.($maxScheme + 19).'s %-'.($maxHost + 19).'s %s'; + $format = '%-'.$maxName.'s %-'.$maxMethod.'s %-'.$maxScheme.'s %-'.$maxHost.'s %s'; + $formatHeader = '%-'.($maxName + 19).'s %-'.($maxMethod + 19).'s %-'.($maxScheme + 19).'s %-'.($maxHost + 19).'s %s'; $output->writeln(sprintf($formatHeader, 'Name', 'Method', 'Scheme', 'Host', 'Path')); foreach ($routes as $name => $route) { diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index fc6a6ade56..c7f8a4de4c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -229,7 +229,7 @@ class Configuration implements ConfigurationInterface $organizeUrls = function ($urls) { $urls += array( 'http' => array(), - 'ssl' => array(), + 'ssl' => array(), ); foreach ($urls as $i => $url) { diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 9b67abf461..28139a3755 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -218,13 +218,13 @@ class FrameworkExtension extends Extension // Choose storage class based on the DSN $supported = array( - 'sqlite' => 'Symfony\Component\HttpKernel\Profiler\SqliteProfilerStorage', - 'mysql' => 'Symfony\Component\HttpKernel\Profiler\MysqlProfilerStorage', - 'file' => 'Symfony\Component\HttpKernel\Profiler\FileProfilerStorage', - 'mongodb' => 'Symfony\Component\HttpKernel\Profiler\MongoDbProfilerStorage', - 'memcache' => 'Symfony\Component\HttpKernel\Profiler\MemcacheProfilerStorage', + 'sqlite' => 'Symfony\Component\HttpKernel\Profiler\SqliteProfilerStorage', + 'mysql' => 'Symfony\Component\HttpKernel\Profiler\MysqlProfilerStorage', + 'file' => 'Symfony\Component\HttpKernel\Profiler\FileProfilerStorage', + 'mongodb' => 'Symfony\Component\HttpKernel\Profiler\MongoDbProfilerStorage', + 'memcache' => 'Symfony\Component\HttpKernel\Profiler\MemcacheProfilerStorage', 'memcached' => 'Symfony\Component\HttpKernel\Profiler\MemcachedProfilerStorage', - 'redis' => 'Symfony\Component\HttpKernel\Profiler\RedisProfilerStorage', + 'redis' => 'Symfony\Component\HttpKernel\Profiler\RedisProfilerStorage', ); list($class, ) = explode(':', $config['dsn'], 2); if (!isset($supported[$class])) { @@ -358,9 +358,9 @@ class FrameworkExtension extends Extension $links = array( 'textmate' => 'txmt://open?url=file://%%f&line=%%l', - 'macvim' => 'mvim://open?url=file://%%f&line=%%l', - 'emacs' => 'emacs://open?url=file://%%f&line=%%l', - 'sublime' => 'subl://open?url=file://%%f&line=%%l', + 'macvim' => 'mvim://open?url=file://%%f&line=%%l', + 'emacs' => 'emacs://open?url=file://%%f&line=%%l', + 'sublime' => 'subl://open?url=file://%%f&line=%%l', ); $container->setParameter('templating.helper.code.file_link_format', isset($links[$ide]) ? $links[$ide] : $ide); diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableUrlMatcher.php b/src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableUrlMatcher.php index ffbb6487cb..76f853643c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableUrlMatcher.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableUrlMatcher.php @@ -31,12 +31,12 @@ class RedirectableUrlMatcher extends BaseMatcher { return array( '_controller' => 'Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController::urlRedirectAction', - 'path' => $path, - 'permanent' => true, - 'scheme' => $scheme, - 'httpPort' => $this->context->getHttpPort(), - 'httpsPort' => $this->context->getHttpsPort(), - '_route' => $route, + 'path' => $path, + 'permanent' => true, + 'scheme' => $scheme, + 'httpPort' => $this->context->getHttpPort(), + 'httpsPort' => $this->context->getHttpsPort(), + '_route' => $route, ); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php index be845ae31b..795b86e1b6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php @@ -93,7 +93,7 @@ class CodeHelper extends Helper $formattedValue = sprintf("object(%s)", $item[1], $short); } elseif ('array' === $item[0]) { $formattedValue = sprintf("array(%s)", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); - } elseif ('string' === $item[0]) { + } elseif ('string' === $item[0]) { $formattedValue = sprintf("'%s'", htmlspecialchars($item[1], ENT_QUOTES, $this->getCharset())); } elseif ('null' === $item[0]) { $formattedValue = 'null'; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateReference.php b/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateReference.php index 65a5779b2e..0687a9913b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateReference.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateReference.php @@ -23,11 +23,11 @@ class TemplateReference extends BaseTemplateReference public function __construct($bundle = null, $controller = null, $name = null, $format = null, $engine = null) { $this->parameters = array( - 'bundle' => $bundle, + 'bundle' => $bundle, 'controller' => $controller, - 'name' => $name, - 'format' => $format, - 'engine' => $engine, + 'name' => $name, + 'format' => $format, + 'engine' => $engine, ); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php index b18ade8793..1007143301 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php @@ -23,7 +23,7 @@ class ControllerNameParserTest extends TestCase { $this->loader = new ClassLoader(); $this->loader->addPrefixes(array( - 'TestBundle' => __DIR__.'/../Fixtures', + 'TestBundle' => __DIR__.'/../Fixtures', 'TestApplication' => __DIR__.'/../Fixtures', )); $this->loader->register(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php index 1bcf1debf0..1bcb01189e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -35,7 +35,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase $processor = new Processor(); $configuration = new Configuration(); $config = $processor->processConfiguration($configuration, array(array( - 'secret' => 's3cr3t', + 'secret' => 's3cr3t', 'trusted_proxies' => $trustedProxies, ))); @@ -90,44 +90,44 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase { return array( 'http_method_override' => true, - 'trusted_proxies' => array(), - 'ide' => null, - 'default_locale' => 'en', - 'form' => array('enabled' => false), - 'csrf_protection' => array( - 'enabled' => true, + 'trusted_proxies' => array(), + 'ide' => null, + 'default_locale' => 'en', + 'form' => array('enabled' => false), + 'csrf_protection' => array( + 'enabled' => true, 'field_name' => '_token', ), - 'esi' => array('enabled' => false), - 'fragments' => array( + 'esi' => array('enabled' => false), + 'fragments' => array( 'enabled' => false, - 'path' => '/_fragment', + 'path' => '/_fragment', ), - 'profiler' => array( - 'enabled' => false, - 'only_exceptions' => false, + 'profiler' => array( + 'enabled' => false, + 'only_exceptions' => false, 'only_master_requests' => false, - 'dsn' => 'file:%kernel.cache_dir%/profiler', - 'username' => '', - 'password' => '', - 'lifetime' => 86400, - 'collect' => true, + 'dsn' => 'file:%kernel.cache_dir%/profiler', + 'username' => '', + 'password' => '', + 'lifetime' => 86400, + 'collect' => true, ), - 'translator' => array( - 'enabled' => false, + 'translator' => array( + 'enabled' => false, 'fallback' => 'en', ), - 'validation' => array( - 'enabled' => false, + 'validation' => array( + 'enabled' => false, 'enable_annotations' => false, 'translation_domain' => 'validators', ), - 'annotations' => array( - 'cache' => 'file', + 'annotations' => array( + 'cache' => 'file', 'file_cache_dir' => '%kernel.cache_dir%/annotations', - 'debug' => '%kernel.debug%', + 'debug' => '%kernel.debug%', ), - 'serializer' => array( + 'serializer' => array( 'enabled' => false, ), ); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php index 801f61b94e..95f94e5095 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php @@ -7,7 +7,7 @@ $container->loadFromExtension('framework', array( 'http_method_override' => false, 'trusted_proxies' => array('127.0.0.1', '10.0.0.1'), 'csrf_protection' => array( - 'enabled' => true, + 'enabled' => true, 'field_name' => '_csrf', ), 'esi' => array( @@ -18,32 +18,32 @@ $container->loadFromExtension('framework', array( 'enabled' => false, ), 'router' => array( - 'resource' => '%kernel.root_dir%/config/routing.xml', - 'type' => 'xml', + 'resource' => '%kernel.root_dir%/config/routing.xml', + 'type' => 'xml', ), 'session' => array( - 'storage_id' => 'session.storage.native', - 'handler_id' => 'session.handler.native_file', - 'name' => '_SYMFONY', + 'storage_id' => 'session.storage.native', + 'handler_id' => 'session.handler.native_file', + 'name' => '_SYMFONY', 'cookie_lifetime' => 86400, - 'cookie_path' => '/', - 'cookie_domain' => 'example.com', - 'cookie_secure' => true, + 'cookie_path' => '/', + 'cookie_domain' => 'example.com', + 'cookie_secure' => true, 'cookie_httponly' => true, - 'gc_maxlifetime' => 90000, - 'gc_divisor' => 108, - 'gc_probability' => 1, - 'save_path' => '/path/to/sessions', + 'gc_maxlifetime' => 90000, + 'gc_divisor' => 108, + 'gc_probability' => 1, + 'save_path' => '/path/to/sessions', ), 'templating' => array( - 'assets_version' => 'SomeVersionScheme', + 'assets_version' => 'SomeVersionScheme', 'assets_base_urls' => 'http://cdn.example.com', - 'cache' => '/path/to/cache', - 'engines' => array('php', 'twig'), - 'loader' => array('loader.foo', 'loader.bar'), - 'packages' => array( + 'cache' => '/path/to/cache', + 'engines' => array('php', 'twig'), + 'loader' => array('loader.foo', 'loader.bar'), + 'packages' => array( 'images' => array( - 'version' => '1.0.0', + 'version' => '1.0.0', 'base_urls' => array('http://images1.example.com', 'http://images2.example.com'), ), 'foo' => array( @@ -53,18 +53,18 @@ $container->loadFromExtension('framework', array( 'base_urls' => array('http://bar1.example.com', 'http://bar2.example.com'), ), ), - 'form' => array( - 'resources' => array('theme1', 'theme2'), + 'form' => array( + 'resources' => array('theme1', 'theme2'), ), 'hinclude_default_template' => 'global_hinclude_template', ), 'translator' => array( - 'enabled' => true, + 'enabled' => true, 'fallback' => 'fr', ), 'validation' => array( 'enabled' => true, - 'cache' => 'apc', + 'cache' => 'apc', ), 'annotations' => array( 'cache' => 'file', diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_url_package.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_url_package.php index a5dda77dad..afbd7bc460 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_url_package.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_url_package.php @@ -4,8 +4,8 @@ $container->loadFromExtension('framework', array( 'secret' => 's3cr3t', 'templating' => array( 'assets_base_urls' => 'https://cdn.example.com', - 'engines' => array('php', 'twig'), - 'packages' => array( + 'engines' => array('php', 'twig'), + 'packages' => array( 'images' => array( 'base_urls' => 'https://images.example.com', ), diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_annotations.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_annotations.php index d0c1fdab52..35a0b3d39e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_annotations.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_annotations.php @@ -3,7 +3,7 @@ $container->loadFromExtension('framework', array( 'secret' => 's3cr3t', 'validation' => array( - 'enabled' => true, + 'enabled' => true, 'enable_annotations' => true, ), )); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index df4983d7ff..e217c56918 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -288,12 +288,12 @@ abstract class FrameworkExtensionTest extends TestCase protected function createContainer(array $data = array()) { return new ContainerBuilder(new ParameterBag(array_merge(array( - 'kernel.bundles' => array('FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle'), - 'kernel.cache_dir' => __DIR__, - 'kernel.debug' => false, + 'kernel.bundles' => array('FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle'), + 'kernel.cache_dir' => __DIR__, + 'kernel.debug' => false, 'kernel.environment' => 'test', - 'kernel.name' => 'kernel', - 'kernel.root_dir' => __DIR__, + 'kernel.name' => 'kernel', + 'kernel.root_dir' => __DIR__, ), $data))); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/TestSessionListenerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/TestSessionListenerTest.php index 2c91254eb3..5e44549ddc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/TestSessionListenerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/TestSessionListenerTest.php @@ -40,7 +40,7 @@ class TestSessionListenerTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->listener = new TestSessionListener($this->getMock('Symfony\Component\DependencyInjection\ContainerInterface')); - $this->session = $this->getSession(); + $this->session = $this->getSession(); } protected function tearDown() diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php index 95f5dfa76f..e1bd050ce0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php @@ -27,7 +27,7 @@ class SubRequestController extends ContainerAware // simulates a failure during the rendering of a fragment... // should render fr/json - $content = $handler->render($errorUrl, 'inline', array('alt' => $altUrl)); + $content = $handler->render($errorUrl, 'inline', array('alt' => $altUrl)); // ...to check that the FragmentListener still references the right Request // when rendering another fragment after the error occurred diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableUrlMatcherTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableUrlMatcherTest.php index fe8fc709a6..6b31fb2e49 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableUrlMatcherTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableUrlMatcherTest.php @@ -27,12 +27,12 @@ class RedirectableUrlMatcherTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array( '_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction', - 'path' => '/foo/', - 'permanent' => true, - 'scheme' => null, - 'httpPort' => $context->getHttpPort(), - 'httpsPort' => $context->getHttpsPort(), - '_route' => null, + 'path' => '/foo/', + 'permanent' => true, + 'scheme' => null, + 'httpPort' => $context->getHttpPort(), + 'httpsPort' => $context->getHttpsPort(), + '_route' => null, ), $matcher->match('/foo') ); @@ -47,12 +47,12 @@ class RedirectableUrlMatcherTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array( '_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction', - 'path' => '/foo', - 'permanent' => true, - 'scheme' => 'https', - 'httpPort' => $context->getHttpPort(), - 'httpsPort' => $context->getHttpsPort(), - '_route' => 'foo', + 'path' => '/foo', + 'permanent' => true, + 'scheme' => 'https', + 'httpPort' => $context->getHttpPort(), + 'httpsPort' => $context->getHttpsPort(), + '_route' => 'foo', ), $matcher->match('/foo') ); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php index bc44b78a18..0d3dab8488 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php @@ -47,11 +47,11 @@ class RouterTest extends \PHPUnit_Framework_TestCase $routes->add('foo', new Route( '/foo', array( - 'foo' => 'before_%parameter.foo%', - 'bar' => '%parameter.bar%_after', - 'baz' => '%%escaped%%', - 'boo' => array('%parameter%', '%%escaped_parameter%%', array('%bee_parameter%', 'bee')), - 'bee' => array('bee', 'bee'), + 'foo' => 'before_%parameter.foo%', + 'bar' => '%parameter.bar%_after', + 'baz' => '%%escaped%%', + 'boo' => array('%parameter%', '%%escaped_parameter%%', array('%bee_parameter%', 'bee')), + 'bee' => array('bee', 'bee'), ), array( ) @@ -88,9 +88,9 @@ class RouterTest extends \PHPUnit_Framework_TestCase array( ), array( - 'foo' => 'before_%parameter.foo%', - 'bar' => '%parameter.bar%_after', - 'baz' => '%%escaped%%', + 'foo' => 'before_%parameter.foo%', + 'bar' => '%parameter.bar%_after', + 'baz' => '%%escaped%%', ) )); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php index 68ad018a68..ab4818703f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php @@ -207,8 +207,8 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase ->expects($this->at(1)) ->method('load') ->will($this->returnValue($this->getCatalogue('en', array( - 'foo' => 'foo (EN)', - 'bar' => 'bar (EN)', + 'foo' => 'foo (EN)', + 'bar' => 'bar (EN)', 'choice' => '{0} choice 0 (EN)|{1} choice 1 (EN)|]1,Inf] choice inf (EN)', )))) ; diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php index 34d079069b..1bb4173763 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php +++ b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php @@ -51,13 +51,13 @@ class PhpStringTokenParser { protected static $replacements = array( '\\' => '\\', - '$' => '$', - 'n' => "\n", - 'r' => "\r", - 't' => "\t", - 'f' => "\f", - 'v' => "\v", - 'e' => "\x1B", + '$' => '$', + 'n' => "\n", + 'r' => "\r", + 't' => "\t", + 'f' => "\f", + 'v' => "\v", + 'e' => "\x1B", ); /** diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php index 92f90d4ff5..ffc050fb48 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php +++ b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php @@ -49,7 +49,7 @@ class Translator extends BaseTranslator $this->options = array( 'cache_dir' => null, - 'debug' => false, + 'debug' => false, ); // check option names diff --git a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php index 35621d9c27..c69e451eb2 100644 --- a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php +++ b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php @@ -37,27 +37,27 @@ class SecurityDataCollector extends DataCollector { if (null === $this->context) { $this->data = array( - 'enabled' => false, + 'enabled' => false, 'authenticated' => false, - 'token_class' => null, - 'user' => '', - 'roles' => array(), + 'token_class' => null, + 'user' => '', + 'roles' => array(), ); } elseif (null === $token = $this->context->getToken()) { $this->data = array( - 'enabled' => true, + 'enabled' => true, 'authenticated' => false, - 'token_class' => null, - 'user' => '', - 'roles' => array(), + 'token_class' => null, + 'user' => '', + 'roles' => array(), ); } else { $this->data = array( - 'enabled' => true, + 'enabled' => true, 'authenticated' => $token->isAuthenticated(), - 'token_class' => get_class($token), - 'user' => $token->getUsername(), - 'roles' => array_map(function ($role) { return $role->getRole();}, $token->getRoles()), + 'token_class' => get_class($token), + 'user' => $token->getUsername(), + 'roles' => array_map(function ($role) { return $role->getRole();}, $token->getRoles()), ); } } diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php index 0caf1a9207..209defc0bf 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php @@ -27,24 +27,24 @@ use Symfony\Component\DependencyInjection\Reference; abstract class AbstractFactory implements SecurityFactoryInterface { protected $options = array( - 'check_path' => '/login_check', - 'use_forward' => false, - 'require_previous_session' => true, + 'check_path' => '/login_check', + 'use_forward' => false, + 'require_previous_session' => true, ); protected $defaultSuccessHandlerOptions = array( 'always_use_default_target_path' => false, - 'default_target_path' => '/', - 'login_path' => '/login', - 'target_path_parameter' => '_target_path', - 'use_referer' => false, + 'default_target_path' => '/', + 'login_path' => '/login', + 'target_path_parameter' => '_target_path', + 'use_referer' => false, ); protected $defaultFailureHandlerOptions = array( - 'failure_path' => null, - 'failure_forward' => false, - 'login_path' => '/login', - 'failure_path_parameter' => '_failure_path', + 'failure_path' => null, + 'failure_forward' => false, + 'login_path' => '/login', + 'failure_path_parameter' => '_failure_path', ); public function create(ContainerBuilder $container, $id, $config, $userProviderId, $defaultEntryPointId) diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php index 17f16c0293..ad986a7497 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php @@ -135,8 +135,8 @@ class SecurityExtension extends Extension ->getDefinition('security.acl.dbal.schema_listener') ->addTag('doctrine.event_listener', array( 'connection' => $config['connection'], - 'event' => 'postGenerateSchema', - 'lazy' => true, + 'event' => 'postGenerateSchema', + 'lazy' => true, )) ; @@ -281,8 +281,8 @@ class SecurityExtension extends Extension $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.logout_listener')); $listener->replaceArgument(3, array( 'csrf_parameter' => $firewall['logout']['csrf_parameter'], - 'intention' => $firewall['logout']['intention'], - 'logout_path' => $firewall['logout']['path'], + 'intention' => $firewall['logout']['intention'], + 'logout_path' => $firewall['logout']['path'], )); $listeners[] = new Reference($listenerId); @@ -452,7 +452,7 @@ class SecurityExtension extends Extension // pbkdf2 encoder if ('pbkdf2' === $config['algorithm']) { return array( - 'class' => new Parameter('security.encoder.pbkdf2.class'), + 'class' => new Parameter('security.encoder.pbkdf2.class'), 'arguments' => array( $config['hash_algorithm'], $config['encode_as_base64'], @@ -465,14 +465,14 @@ class SecurityExtension extends Extension // bcrypt encoder if ('bcrypt' === $config['algorithm']) { return array( - 'class' => new Parameter('security.encoder.bcrypt.class'), + 'class' => new Parameter('security.encoder.bcrypt.class'), 'arguments' => array($config['cost']), ); } // message digest encoder return array( - 'class' => new Parameter('security.encoder.digest.class'), + 'class' => new Parameter('security.encoder.digest.class'), 'arguments' => array( $config['algorithm'], $config['encode_as_base64'], diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php index 2e55643c70..00e51e8830 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php @@ -26,9 +26,9 @@ abstract class CompleteConfigurationTest extends \PHPUnit_Framework_TestCase { $container = $this->getContainer('container1'); $this->assertEquals(array( - 'ROLE_ADMIN' => array('ROLE_USER'), + 'ROLE_ADMIN' => array('ROLE_USER'), 'ROLE_SUPER_ADMIN' => array('ROLE_USER', 'ROLE_ADMIN', 'ROLE_ALLOWED_TO_SWITCH'), - 'ROLE_REMOTE' => array('ROLE_USER', 'ROLE_ADMIN'), + 'ROLE_REMOTE' => array('ROLE_USER', 'ROLE_ADMIN'), ), $container->getParameter('security.role_hierarchy.roles')); } 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 2bc24bc7de..e27811fea0 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php @@ -36,7 +36,7 @@ class AbstractFactoryTest extends \PHPUnit_Framework_TestCase 'index_5' => new Reference('qux'), 'index_6' => new Reference('bar'), 'index_7' => array( - 'use_forward' => true, + 'use_forward' => true, ), ), $definition->getArguments()); 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 344245955b..1eccbfd795 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 @@ -22,7 +22,7 @@ class LoginController extends ContainerAware $form = $this->container->get('form.factory')->create('user_login'); return $this->container->get('templating')->renderResponse('CsrfFormLoginBundle:Login:login.html.twig', array( - 'form' => $form->createView(), + 'form' => $form->createView(), )); } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php index 381b13d7dd..9a33781a7e 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php @@ -29,7 +29,7 @@ class LocalizedController extends ContainerAware return $this->container->get('templating')->renderResponse('FormLoginBundle:Localized:login.html.twig', array( // last username entered by the user 'last_username' => $this->container->get('request')->getSession()->get(SecurityContext::LAST_USERNAME), - 'error' => $error, + 'error' => $error, )); } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php index cec298c891..eabb5683e6 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php @@ -30,7 +30,7 @@ class LoginController extends ContainerAware return $this->container->get('templating')->renderResponse('FormLoginBundle:Login:login.html.twig', array( // last username entered by the user 'last_username' => $this->container->get('request')->getSession()->get(SecurityContext::LAST_USERNAME), - 'error' => $error, + 'error' => $error, )); } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php index 8c0c33925c..d9472f2f7d 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php @@ -54,10 +54,10 @@ class SwitchUserTest extends WebTestCase public function getTestParameters() { return array( - 'unauthorized_user_cannot_switch' => array('user_cannot_switch_1', 'user_cannot_switch_1', 'user_cannot_switch_1', 403), - 'authorized_user_can_switch' => array('user_can_switch', 'user_cannot_switch_1', 'user_cannot_switch_1', 200), + 'unauthorized_user_cannot_switch' => array('user_cannot_switch_1', 'user_cannot_switch_1', 'user_cannot_switch_1', 403), + 'authorized_user_can_switch' => array('user_can_switch', 'user_cannot_switch_1', 'user_cannot_switch_1', 200), 'authorized_user_cannot_switch_to_non_existent' => array('user_can_switch', 'user_does_not_exist', 'user_can_switch', 500), - 'authorized_user_can_switch_to_himself' => array('user_can_switch', 'user_can_switch', 'user_can_switch', 200), + 'authorized_user_can_switch_to_himself' => array('user_can_switch', 'user_can_switch', 'user_can_switch', 200), ); } diff --git a/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php b/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php index 7ba8e2a53b..3b301823ca 100644 --- a/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php +++ b/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php @@ -54,10 +54,10 @@ class ExceptionController return new Response($this->twig->render( (string) $this->findTemplate($request, $request->getRequestFormat(), $code, $this->debug), array( - 'status_code' => $code, - 'status_text' => isset(Response::$statusTexts[$code]) ? Response::$statusTexts[$code] : '', - 'exception' => $exception, - 'logger' => $logger, + 'status_code' => $code, + 'status_text' => isset(Response::$statusTexts[$code]) ? Response::$statusTexts[$code] : '', + 'exception' => $exception, + 'logger' => $logger, 'currentContent' => $currentContent, ) )); diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php index 3f1e0176b3..f188128cc1 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php @@ -41,7 +41,7 @@ class TwigExtension extends Extension foreach ($config['globals'] as $name => $value) { if (is_array($value) && isset($value['key'])) { $config['globals'][$name] = array( - 'key' => $name, + 'key' => $name, 'value' => $config['globals'][$name], ); } diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/customTemplateEscapingGuesser.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/customTemplateEscapingGuesser.php index 9e1d40505d..ab429237bb 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/customTemplateEscapingGuesser.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/customTemplateEscapingGuesser.php @@ -1,6 +1,6 @@ loadFromExtension('twig', array( - 'autoescape_service' => 'my_project.some_bundle.template_escaping_guesser', + 'autoescape_service' => 'my_project.some_bundle.template_escaping_guesser', 'autoescape_service_method' => 'guess', )); diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/extra.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/extra.php index 47d00ef445..28b8281a99 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/extra.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/extra.php @@ -1,7 +1,7 @@ loadFromExtension('twig', array( - 'paths' => array( + 'paths' => array( 'namespaced_path3' => 'namespace3', ), )); diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php index c6d506e86a..4a2bdd5b29 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php @@ -9,17 +9,17 @@ $container->loadFromExtension('twig', array( 'globals' => array( 'foo' => '@bar', 'baz' => '@@qux', - 'pi' => 3.14, + 'pi' => 3.14, 'bad' => array('key' => 'foo'), ), - 'auto_reload' => true, - 'autoescape' => true, + 'auto_reload' => true, + 'autoescape' => true, 'base_template_class' => 'stdClass', - 'cache' => '/tmp', - 'charset' => 'ISO-8859-1', - 'debug' => true, - 'strict_variables' => true, - 'paths' => array( + 'cache' => '/tmp', + 'charset' => 'ISO-8859-1', + 'debug' => true, + 'strict_variables' => true, + 'paths' => array( 'path1', 'path2', 'namespaced_path1' => 'namespace1', diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php index 6d0fc467e5..91c7b7793a 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php @@ -114,14 +114,14 @@ class TwigExtensionTest extends TestCase public function testGlobalsWithDifferentTypesAndValues() { $globals = array( - 'array' => array(), - 'false' => false, - 'float' => 2.0, + 'array' => array(), + 'false' => false, + 'float' => 2.0, 'integer' => 3, - 'null' => null, - 'object' => new \stdClass(), - 'string' => 'foo', - 'true' => true, + 'null' => null, + 'object' => new \stdClass(), + 'string' => 'foo', + 'true' => true, ); $container = $this->createContainer(); @@ -183,10 +183,10 @@ class TwigExtensionTest extends TestCase { $container = new ContainerBuilder(new ParameterBag(array( 'kernel.cache_dir' => __DIR__, - 'kernel.root_dir' => __DIR__.'/Fixtures', - 'kernel.charset' => 'UTF-8', - 'kernel.debug' => false, - 'kernel.bundles' => array('TwigBundle' => 'Symfony\\Bundle\\TwigBundle\\TwigBundle'), + 'kernel.root_dir' => __DIR__.'/Fixtures', + 'kernel.charset' => 'UTF-8', + 'kernel.debug' => false, + 'kernel.bundles' => array('TwigBundle' => 'Symfony\\Bundle\\TwigBundle\\TwigBundle'), ))); return $container; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php index 91ee055c49..0b5db752ee 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php @@ -65,10 +65,10 @@ class ExceptionController return new Response($this->twig->render( $template, array( - 'status_code' => $code, - 'status_text' => Response::$statusTexts[$code], - 'exception' => $exception, - 'logger' => null, + 'status_code' => $code, + 'status_text' => Response::$statusTexts[$code], + 'exception' => $exception, + 'logger' => null, 'currentContent' => '', ) ), 200, array('Content-Type' => 'text/html')); diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 2efb84a14d..604890cc53 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -100,14 +100,14 @@ class ProfilerController } return new Response($this->twig->render($this->getTemplateManager()->getName($profile, $panel), array( - 'token' => $token, - 'profile' => $profile, + 'token' => $token, + 'profile' => $profile, 'collector' => $profile->getCollector($panel), - 'panel' => $panel, - 'page' => $page, - 'request' => $request, + 'panel' => $panel, + 'page' => $page, + 'request' => $request, 'templates' => $this->getTemplateManager()->getTemplates($profile), - 'is_ajax' => $request->isXmlHttpRequest(), + 'is_ajax' => $request->isXmlHttpRequest(), )), 200, array('Content-Type' => 'text/html')); } @@ -198,11 +198,11 @@ class ProfilerController } return new Response($this->twig->render('@WebProfiler/Profiler/toolbar.html.twig', array( - 'position' => $position, - 'profile' => $profile, - 'templates' => $this->getTemplateManager()->getTemplates($profile), + 'position' => $position, + 'profile' => $profile, + 'templates' => $this->getTemplateManager()->getTemplates($profile), 'profiler_url' => $url, - 'token' => $token, + 'token' => $token, )), 200, array('Content-Type' => 'text/html')); } @@ -224,31 +224,31 @@ class ProfilerController $this->profiler->disable(); if (null === $session = $request->getSession()) { - $ip = + $ip = $method = - $url = - $start = - $end = - $limit = - $token = null; + $url = + $start = + $end = + $limit = + $token = null; } else { - $ip = $session->get('_profiler_search_ip'); + $ip = $session->get('_profiler_search_ip'); $method = $session->get('_profiler_search_method'); - $url = $session->get('_profiler_search_url'); - $start = $session->get('_profiler_search_start'); - $end = $session->get('_profiler_search_end'); - $limit = $session->get('_profiler_search_limit'); - $token = $session->get('_profiler_search_token'); + $url = $session->get('_profiler_search_url'); + $start = $session->get('_profiler_search_start'); + $end = $session->get('_profiler_search_end'); + $limit = $session->get('_profiler_search_limit'); + $token = $session->get('_profiler_search_token'); } return new Response($this->twig->render('@WebProfiler/Profiler/search.html.twig', array( - 'token' => $token, - 'ip' => $ip, + 'token' => $token, + 'ip' => $ip, 'method' => $method, - 'url' => $url, - 'start' => $start, - 'end' => $end, - 'limit' => $limit, + 'url' => $url, + 'start' => $start, + 'end' => $end, + 'limit' => $limit, )), 200, array('Content-Type' => 'text/html')); } @@ -272,24 +272,24 @@ class ProfilerController $profile = $this->profiler->loadProfile($token); - $ip = $request->query->get('ip'); + $ip = $request->query->get('ip'); $method = $request->query->get('method'); - $url = $request->query->get('url'); - $start = $request->query->get('start', null); - $end = $request->query->get('end', null); - $limit = $request->query->get('limit'); + $url = $request->query->get('url'); + $start = $request->query->get('start', null); + $end = $request->query->get('end', null); + $limit = $request->query->get('limit'); return new Response($this->twig->render('@WebProfiler/Profiler/results.html.twig', array( - 'token' => $token, - 'profile' => $profile, - 'tokens' => $this->profiler->find($ip, $url, $limit, $method, $start, $end), - 'ip' => $ip, - 'method' => $method, - 'url' => $url, - 'start' => $start, - 'end' => $end, - 'limit' => $limit, - 'panel' => null, + 'token' => $token, + 'profile' => $profile, + 'tokens' => $this->profiler->find($ip, $url, $limit, $method, $start, $end), + 'ip' => $ip, + 'method' => $method, + 'url' => $url, + 'start' => $start, + 'end' => $end, + 'limit' => $limit, + 'panel' => null, )), 200, array('Content-Type' => 'text/html')); } @@ -310,13 +310,13 @@ class ProfilerController $this->profiler->disable(); - $ip = preg_replace('/[^:\d\.]/', '', $request->query->get('ip')); + $ip = preg_replace('/[^:\d\.]/', '', $request->query->get('ip')); $method = $request->query->get('method'); - $url = $request->query->get('url'); - $start = $request->query->get('start', null); - $end = $request->query->get('end', null); - $limit = $request->query->get('limit'); - $token = $request->query->get('token'); + $url = $request->query->get('url'); + $start = $request->query->get('start', null); + $end = $request->query->get('end', null); + $limit = $request->query->get('limit'); + $token = $request->query->get('token'); if (null !== $session = $request->getSession()) { $session->set('_profiler_search_ip', $ip); @@ -335,13 +335,13 @@ class ProfilerController $tokens = $this->profiler->find($ip, $url, $limit, $method, $start, $end); return new RedirectResponse($this->generator->generate('_profiler_search_results', array( - 'token' => $tokens ? $tokens[0]['token'] : 'empty', - 'ip' => $ip, + 'token' => $tokens ? $tokens[0]['token'] : 'empty', + 'ip' => $ip, 'method' => $method, - 'url' => $url, - 'start' => $start, - 'end' => $end, - 'limit' => $limit, + 'url' => $url, + 'start' => $start, + 'end' => $end, + 'limit' => $limit, )), 302, array('Content-Type' => 'text/html')); } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php index de772eaef1..d171a8885f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php @@ -74,8 +74,8 @@ class RouterController return new Response($this->twig->render('@WebProfiler/Router/panel.html.twig', array( 'request' => $request, - 'router' => $profile->getCollector('router'), - 'traces' => $matcher->getTraces($request->getPathInfo()), + 'router' => $profile->getCollector('router'), + 'traces' => $matcher->getTraces($request->getPathInfo()), )), 200, array('Content-Type' => 'text/html')); } } diff --git a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php index 309b1468f2..1a2663d3fa 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php +++ b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php @@ -31,7 +31,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; class WebDebugToolbarListener implements EventSubscriberInterface { const DISABLED = 1; - const ENABLED = 2; + const ENABLED = 2; protected $twig; protected $interceptRedirects; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig index 8fdedf95e9..4a239070e2 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig @@ -133,10 +133,10 @@ function CanvasManager(requests, maxRequestTime) { "use strict"; - var _drawingColors = {{ colors|json_encode|raw }}, - _storagePrefix = 'timeline/', - _threshold = 1, - _requests = requests, + var _drawingColors = {{ colors|json_encode|raw }}, + _storagePrefix = 'timeline/', + _threshold = 1, + _requests = requests, _maxRequestTime = maxRequestTime; /** @@ -183,16 +183,16 @@ xc, drawableEvents, mainEvents, - elementId = 'timeline_' + request.id, + elementId = 'timeline_' + request.id, canvasHeight = 0, - gapPerEvent = 38, + gapPerEvent = 38, colors = _drawingColors, - space = 10.5, - ratio = (width - space * 2) / max, + space = 10.5, + ratio = (width - space * 2) / max, h = space, x = request.left * ratio + space, // position canvas = cache.get(elementId) || cache.set(elementId, document.getElementById(elementId)), - ctx = canvas.getContext("2d"), + ctx = canvas.getContext("2d"), scaleRatio, devicePixelRatio; @@ -204,10 +204,10 @@ canvasHeight += gapPerEvent * drawableEvents.length; // For retina displays so text and boxes will be crisp - devicePixelRatio = window.devicePixelRatio == "undefined" ? 1 : window.devicePixelRatio; - scaleRatio = devicePixelRatio / 1; + devicePixelRatio = window.devicePixelRatio == "undefined" ? 1 : window.devicePixelRatio; + scaleRatio = devicePixelRatio / 1; - canvas.width = width * scaleRatio; + canvas.width = width * scaleRatio; canvas.height = canvasHeight * scaleRatio; canvas.style.width = width + 'px'; @@ -256,14 +256,14 @@ // For each sub event, ... event.periods.forEach(function(period) { // Set the drawing style. - ctx.fillStyle = colors['default']; + ctx.fillStyle = colors['default']; ctx.strokeStyle = colors['default']; if (colors[event.name]) { - ctx.fillStyle = colors[event.name]; + ctx.fillStyle = colors[event.name]; ctx.strokeStyle = colors[event.name]; } else if (colors[event.category]) { - ctx.fillStyle = colors[event.category]; + ctx.fillStyle = colors[event.category]; ctx.strokeStyle = colors[event.category]; } @@ -353,7 +353,7 @@ { "use strict"; - width = width || getContainerWidth(); + width = width || getContainerWidth(); threshold = threshold || this.getThreshold(); var self = this; @@ -425,15 +425,15 @@ } // Bind event handlers - var elementTimelineControl = query('#timeline-control'), + var elementTimelineControl = query('#timeline-control'), elementThresholdControl = query('input[name="threshold"]'); - window.onresize = canvasAutoUpdateOnResizeAndSubmit; + window.onresize = canvasAutoUpdateOnResizeAndSubmit; elementTimelineControl.onsubmit = canvasAutoUpdateOnResizeAndSubmit; - elementThresholdControl.onclick = canvasAutoUpdateOnThresholdChange; + elementThresholdControl.onclick = canvasAutoUpdateOnThresholdChange; elementThresholdControl.onchange = canvasAutoUpdateOnThresholdChange; - elementThresholdControl.onkeyup = canvasAutoUpdateOnThresholdChange; + elementThresholdControl.onkeyup = canvasAutoUpdateOnThresholdChange; window.setTimeout(function() { canvasAutoUpdateOnThresholdChange(null); diff --git a/src/Symfony/Component/BrowserKit/Client.php b/src/Symfony/Component/BrowserKit/Client.php index 898c934296..4c18cf45e3 100644 --- a/src/Symfony/Component/BrowserKit/Client.php +++ b/src/Symfony/Component/BrowserKit/Client.php @@ -120,7 +120,7 @@ abstract class Client public function setServerParameters(array $server) { $this->server = array_merge(array( - 'HTTP_HOST' => 'localhost', + 'HTTP_HOST' => 'localhost', 'HTTP_USER_AGENT' => 'Symfony2 BrowserKit', ), $server); } diff --git a/src/Symfony/Component/BrowserKit/Cookie.php b/src/Symfony/Component/BrowserKit/Cookie.php index 90636e9a56..30d93d06e9 100644 --- a/src/Symfony/Component/BrowserKit/Cookie.php +++ b/src/Symfony/Component/BrowserKit/Cookie.php @@ -62,17 +62,17 @@ class Cookie public function __construct($name, $value, $expires = null, $path = null, $domain = '', $secure = false, $httponly = true, $encodedValue = false) { if ($encodedValue) { - $this->value = urldecode($value); + $this->value = urldecode($value); $this->rawValue = $value; } else { - $this->value = $value; + $this->value = $value; $this->rawValue = urlencode($value); } - $this->name = $name; - $this->expires = null === $expires ? null : (int) $expires; - $this->path = empty($path) ? '/' : $path; - $this->domain = $domain; - $this->secure = (bool) $secure; + $this->name = $name; + $this->expires = null === $expires ? null : (int) $expires; + $this->path = empty($path) ? '/' : $path; + $this->domain = $domain; + $this->secure = (bool) $secure; $this->httponly = (bool) $httponly; } @@ -141,12 +141,12 @@ class Cookie list($name, $value) = explode('=', array_shift($parts), 2); $values = array( - 'name' => trim($name), - 'value' => trim($value), - 'expires' => null, - 'path' => '/', - 'domain' => '', - 'secure' => false, + 'name' => trim($name), + 'value' => trim($value), + 'expires' => null, + 'path' => '/', + 'domain' => '', + 'secure' => false, 'httponly' => false, 'passedRawValue' => true, ); diff --git a/src/Symfony/Component/BrowserKit/Response.php b/src/Symfony/Component/BrowserKit/Response.php index 77aad8376c..a3a22cc39c 100644 --- a/src/Symfony/Component/BrowserKit/Response.php +++ b/src/Symfony/Component/BrowserKit/Response.php @@ -39,7 +39,7 @@ class Response public function __construct($content = '', $status = 200, array $headers = array()) { $this->content = $content; - $this->status = $status; + $this->status = $status; $this->headers = $headers; } diff --git a/src/Symfony/Component/BrowserKit/Tests/ClientTest.php b/src/Symfony/Component/BrowserKit/Tests/ClientTest.php index c14bea0096..ac39b04621 100644 --- a/src/Symfony/Component/BrowserKit/Tests/ClientTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/ClientTest.php @@ -456,7 +456,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase $client = new TestClient(); $client->followRedirects(false); $client->setNextResponse(new Response('', 302, array( - 'Location' => 'http://www.example.com/redirected', + 'Location' => 'http://www.example.com/redirected', 'Set-Cookie' => 'foo=bar', ))); $client->request('GET', 'http://www.example.com/'); @@ -468,16 +468,16 @@ class ClientTest extends \PHPUnit_Framework_TestCase public function testFollowRedirectWithHeaders() { $headers = array( - 'HTTP_HOST' => 'www.example.com', + 'HTTP_HOST' => 'www.example.com', 'HTTP_USER_AGENT' => 'Symfony2 BrowserKit', - 'CONTENT_TYPE' => 'application/vnd.custom+xml', - 'HTTPS' => false, + 'CONTENT_TYPE' => 'application/vnd.custom+xml', + 'HTTPS' => false, ); $client = new TestClient(); $client->followRedirects(false); $client->setNextResponse(new Response('', 302, array( - 'Location' => 'http://www.example.com/redirected', + 'Location' => 'http://www.example.com/redirected', ))); $client->request('GET', 'http://www.example.com/', array(), array(), array( 'CONTENT_TYPE' => 'application/vnd.custom+xml', @@ -495,15 +495,15 @@ class ClientTest extends \PHPUnit_Framework_TestCase public function testFollowRedirectWithPort() { $headers = array( - 'HTTP_HOST' => 'www.example.com:8080', + 'HTTP_HOST' => 'www.example.com:8080', 'HTTP_USER_AGENT' => 'Symfony2 BrowserKit', - 'HTTPS' => false, - 'HTTP_REFERER' => 'http://www.example.com:8080/', + 'HTTPS' => false, + 'HTTP_REFERER' => 'http://www.example.com:8080/', ); $client = new TestClient(); $client->setNextResponse(new Response('', 302, array( - 'Location' => 'http://www.example.com:8080/redirected', + 'Location' => 'http://www.example.com:8080/redirected', ))); $client->request('GET', 'http://www.example.com:8080/'); @@ -633,10 +633,10 @@ class ClientTest extends \PHPUnit_Framework_TestCase $this->assertEquals('Symfony2 BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); $client->request('GET', 'https://www.example.com/https/www.example.com', array(), array(), array( - 'HTTP_HOST' => 'testhost', + 'HTTP_HOST' => 'testhost', 'HTTP_USER_AGENT' => 'testua', - 'HTTPS' => false, - 'NEW_SERVER_KEY' => 'new-server-key-value', + 'HTTPS' => false, + 'NEW_SERVER_KEY' => 'new-server-key-value', )); $this->assertEquals('localhost', $client->getServerParameter('HTTP_HOST')); diff --git a/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php b/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php index 23662dc54b..bfe3cd52c2 100644 --- a/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php @@ -37,7 +37,7 @@ class ResponseTest extends \PHPUnit_Framework_TestCase { $response = new Response('foo', 200, array( 'Content-Type' => 'text/html', - 'Set-Cookie' => array('foo=bar', 'bar=foo'), + 'Set-Cookie' => array('foo=bar', 'bar=foo'), )); $this->assertEquals('text/html', $response->getHeader('Content-Type'), '->getHeader() returns a header of the response'); @@ -61,7 +61,7 @@ class ResponseTest extends \PHPUnit_Framework_TestCase { $headers = array( 'content-type' => 'text/html; charset=utf-8', - 'set-cookie' => array('foo=bar', 'bar=foo'), + 'set-cookie' => array('foo=bar', 'bar=foo'), ); $expected = 'content-type: text/html; charset=utf-8'."\n"; diff --git a/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php b/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php index 023f7ba1a6..4fdf39b222 100644 --- a/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php +++ b/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php @@ -37,8 +37,8 @@ namespace Symfony\Component\ClassLoader; * // register classes with namespaces * $loader->registerNamespaces(array( * 'Symfony\Component' => __DIR__.'/component', - * 'Symfony' => __DIR__.'/framework', - * 'Sensio' => array(__DIR__.'/src', __DIR__.'/vendor'), + * 'Symfony' => __DIR__.'/framework', + * 'Sensio' => array(__DIR__.'/src', __DIR__.'/vendor'), * )); * * // register a library using the PEAR naming convention diff --git a/src/Symfony/Component/ClassLoader/ClassMapGenerator.php b/src/Symfony/Component/ClassLoader/ClassMapGenerator.php index efc95ec8be..6b618cbe63 100644 --- a/src/Symfony/Component/ClassLoader/ClassMapGenerator.php +++ b/src/Symfony/Component/ClassLoader/ClassMapGenerator.php @@ -86,7 +86,7 @@ class ClassMapGenerator private static function findClasses($path) { $contents = file_get_contents($path); - $tokens = token_get_all($contents); + $tokens = token_get_all($contents); $classes = array(); diff --git a/src/Symfony/Component/ClassLoader/README.md b/src/Symfony/Component/ClassLoader/README.md index 3c785049d2..d673688551 100644 --- a/src/Symfony/Component/ClassLoader/README.md +++ b/src/Symfony/Component/ClassLoader/README.md @@ -48,10 +48,10 @@ than one namespace at once: ```php $loader->registerNamespaces(array( - 'Symfony' => array(__DIR__.'/src', __DIR__.'/symfony/src'), + 'Symfony' => array(__DIR__.'/src', __DIR__.'/symfony/src'), 'Doctrine\\Common' => __DIR__.'/vendor/doctrine-common/lib', - 'Doctrine' => __DIR__.'/vendor/doctrine/lib', - 'Monolog' => __DIR__.'/vendor/monolog/src', + 'Doctrine' => __DIR__.'/vendor/doctrine/lib', + 'Monolog' => __DIR__.'/vendor/monolog/src', )); ``` diff --git a/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php b/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php index 596844d9c9..06fa04e454 100644 --- a/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php +++ b/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php @@ -72,9 +72,9 @@ class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase { $data = array( array(__DIR__.'/Fixtures/Namespaced', array( - 'Namespaced\\Bar' => realpath(__DIR__).'/Fixtures/Namespaced/Bar.php', - 'Namespaced\\Foo' => realpath(__DIR__).'/Fixtures/Namespaced/Foo.php', - 'Namespaced\\Baz' => realpath(__DIR__).'/Fixtures/Namespaced/Baz.php', + 'Namespaced\\Bar' => realpath(__DIR__).'/Fixtures/Namespaced/Bar.php', + 'Namespaced\\Foo' => realpath(__DIR__).'/Fixtures/Namespaced/Foo.php', + 'Namespaced\\Baz' => realpath(__DIR__).'/Fixtures/Namespaced/Baz.php', 'Namespaced\\WithComments' => realpath(__DIR__).'/Fixtures/Namespaced/WithComments.php', ), ), @@ -85,22 +85,22 @@ class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase 'NamespaceCollision\\C\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Foo.php', )), array(__DIR__.'/Fixtures/Pearlike', array( - 'Pearlike_Foo' => realpath(__DIR__).'/Fixtures/Pearlike/Foo.php', - 'Pearlike_Bar' => realpath(__DIR__).'/Fixtures/Pearlike/Bar.php', - 'Pearlike_Baz' => realpath(__DIR__).'/Fixtures/Pearlike/Baz.php', + 'Pearlike_Foo' => realpath(__DIR__).'/Fixtures/Pearlike/Foo.php', + 'Pearlike_Bar' => realpath(__DIR__).'/Fixtures/Pearlike/Bar.php', + 'Pearlike_Baz' => realpath(__DIR__).'/Fixtures/Pearlike/Baz.php', 'Pearlike_WithComments' => realpath(__DIR__).'/Fixtures/Pearlike/WithComments.php', )), array(__DIR__.'/Fixtures/classmap', array( - 'Foo\\Bar\\A' => realpath(__DIR__).'/Fixtures/classmap/sameNsMultipleClasses.php', - 'Foo\\Bar\\B' => realpath(__DIR__).'/Fixtures/classmap/sameNsMultipleClasses.php', - 'A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', - 'Alpha\\A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', - 'Alpha\\B' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', - 'Beta\\A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', - 'Beta\\B' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', + 'Foo\\Bar\\A' => realpath(__DIR__).'/Fixtures/classmap/sameNsMultipleClasses.php', + 'Foo\\Bar\\B' => realpath(__DIR__).'/Fixtures/classmap/sameNsMultipleClasses.php', + 'A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', + 'Alpha\\A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', + 'Alpha\\B' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', + 'Beta\\A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', + 'Beta\\B' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', 'ClassMap\\SomeInterface' => realpath(__DIR__).'/Fixtures/classmap/SomeInterface.php', - 'ClassMap\\SomeParent' => realpath(__DIR__).'/Fixtures/classmap/SomeParent.php', - 'ClassMap\\SomeClass' => realpath(__DIR__).'/Fixtures/classmap/SomeClass.php', + 'ClassMap\\SomeParent' => realpath(__DIR__).'/Fixtures/classmap/SomeParent.php', + 'ClassMap\\SomeClass' => realpath(__DIR__).'/Fixtures/classmap/SomeClass.php', )), ); diff --git a/src/Symfony/Component/ClassLoader/UniversalClassLoader.php b/src/Symfony/Component/ClassLoader/UniversalClassLoader.php index 8a3149f319..8588e7039b 100644 --- a/src/Symfony/Component/ClassLoader/UniversalClassLoader.php +++ b/src/Symfony/Component/ClassLoader/UniversalClassLoader.php @@ -32,8 +32,8 @@ namespace Symfony\Component\ClassLoader; * // register classes with namespaces * $loader->registerNamespaces(array( * 'Symfony\Component' => __DIR__.'/component', - * 'Symfony' => __DIR__.'/framework', - * 'Sensio' => array(__DIR__.'/src', __DIR__.'/vendor'), + * 'Symfony' => __DIR__.'/framework', + * 'Sensio' => array(__DIR__.'/src', __DIR__.'/vendor'), * )); * * // register a library using the PEAR naming convention diff --git a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php index e140df70de..29914cbcc9 100644 --- a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php @@ -28,13 +28,13 @@ class NodeBuilder implements NodeParentInterface public function __construct() { $this->nodeMapping = array( - 'variable' => __NAMESPACE__.'\\VariableNodeDefinition', - 'scalar' => __NAMESPACE__.'\\ScalarNodeDefinition', - 'boolean' => __NAMESPACE__.'\\BooleanNodeDefinition', - 'integer' => __NAMESPACE__.'\\IntegerNodeDefinition', - 'float' => __NAMESPACE__.'\\FloatNodeDefinition', - 'array' => __NAMESPACE__.'\\ArrayNodeDefinition', - 'enum' => __NAMESPACE__.'\\EnumNodeDefinition', + 'variable' => __NAMESPACE__.'\\VariableNodeDefinition', + 'scalar' => __NAMESPACE__.'\\ScalarNodeDefinition', + 'boolean' => __NAMESPACE__.'\\BooleanNodeDefinition', + 'integer' => __NAMESPACE__.'\\IntegerNodeDefinition', + 'float' => __NAMESPACE__.'\\FloatNodeDefinition', + 'array' => __NAMESPACE__.'\\ArrayNodeDefinition', + 'enum' => __NAMESPACE__.'\\EnumNodeDefinition', ); } diff --git a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php index d0d9e2e428..9f233d3528 100644 --- a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php @@ -107,13 +107,13 @@ class ArrayNodeTest extends \PHPUnit_Framework_TestCase array( array( 0 => array( - 'name' => 'something', + 'name' => 'something', ), 5 => array( - 0 => 'this won\'t work too', + 0 => 'this won\'t work too', 'new_key' => 'some other value', ), - 'string_key' => 'just value', + 'string_key' => 'just value', ), array( 0 => array ( diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 456a100925..c60119a697 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -754,9 +754,9 @@ class Application $trace = $e->getTrace(); array_unshift($trace, array( 'function' => '', - 'file' => $e->getFile() != null ? $e->getFile() : 'n/a', - 'line' => $e->getLine() != null ? $e->getLine() : 'n/a', - 'args' => array(), + 'file' => $e->getFile() != null ? $e->getFile() : 'n/a', + 'line' => $e->getLine() != null ? $e->getLine() : 'n/a', + 'args' => array(), )); for ($i = 0, $count = count($trace); $i < $count; $i++) { diff --git a/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php index c2b2a53387..b3230ab85a 100644 --- a/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php @@ -30,11 +30,11 @@ class JsonDescriptor extends Descriptor protected function describeInputArgument(InputArgument $argument, array $options = array()) { return $this->output(array( - 'name' => $argument->getName(), + 'name' => $argument->getName(), 'is_required' => $argument->isRequired(), - 'is_array' => $argument->isArray(), + 'is_array' => $argument->isArray(), 'description' => $argument->getDescription(), - 'default' => $argument->getDefault(), + 'default' => $argument->getDefault(), ), $options); } @@ -44,13 +44,13 @@ class JsonDescriptor extends Descriptor protected function describeInputOption(InputOption $option, array $options = array()) { return $this->output(array( - 'name' => '--'.$option->getName(), - 'shortcut' => $option->getShortcut() ? '-'.implode('|-', explode('|', $option->getShortcut())) : '', - 'accept_value' => $option->acceptValue(), + 'name' => '--'.$option->getName(), + 'shortcut' => $option->getShortcut() ? '-'.implode('|-', explode('|', $option->getShortcut())) : '', + 'accept_value' => $option->acceptValue(), 'is_value_required' => $option->isValueRequired(), - 'is_multiple' => $option->isArray(), - 'description' => $option->getDescription(), - 'default' => $option->getDefault(), + 'is_multiple' => $option->isArray(), + 'description' => $option->getDescription(), + 'default' => $option->getDefault(), ), $options); } @@ -81,12 +81,12 @@ class JsonDescriptor extends Descriptor $command->mergeApplicationDefinition(false); return $this->output(array( - 'name' => $command->getName(), - 'usage' => $command->getSynopsis(), + 'name' => $command->getName(), + 'usage' => $command->getSynopsis(), 'description' => $command->getDescription(), - 'help' => $command->getProcessedHelp(), - 'aliases' => $command->getAliases(), - 'definition' => $this->describeInputDefinition($command->getNativeDefinition(), array('as_array' => true)), + 'help' => $command->getProcessedHelp(), + 'aliases' => $command->getAliases(), + 'definition' => $this->describeInputDefinition($command->getNativeDefinition(), array('as_array' => true)), ), $options); } diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php index 0a3e69ef27..a45195ab23 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -21,31 +21,31 @@ namespace Symfony\Component\Console\Formatter; class OutputFormatterStyle implements OutputFormatterStyleInterface { private static $availableForegroundColors = array( - 'black' => 30, - 'red' => 31, - 'green' => 32, - 'yellow' => 33, - 'blue' => 34, - 'magenta' => 35, - 'cyan' => 36, - 'white' => 37, + 'black' => 30, + 'red' => 31, + 'green' => 32, + 'yellow' => 33, + 'blue' => 34, + 'magenta' => 35, + 'cyan' => 36, + 'white' => 37, ); private static $availableBackgroundColors = array( - 'black' => 40, - 'red' => 41, - 'green' => 42, - 'yellow' => 43, - 'blue' => 44, - 'magenta' => 45, - 'cyan' => 46, - 'white' => 47, + 'black' => 40, + 'red' => 41, + 'green' => 42, + 'yellow' => 43, + 'blue' => 44, + 'magenta' => 45, + 'cyan' => 46, + 'white' => 47, ); private static $availableOptions = array( - 'bold' => 1, - 'underscore' => 4, - 'blink' => 5, - 'reverse' => 7, - 'conceal' => 8, + 'bold' => 1, + 'underscore' => 4, + 'blink' => 5, + 'reverse' => 7, + 'conceal' => 8, ); private $foreground; diff --git a/src/Symfony/Component/Console/Helper/ProgressHelper.php b/src/Symfony/Component/Console/Helper/ProgressHelper.php index 96f10f6b79..b3ded1e1b6 100644 --- a/src/Symfony/Component/Console/Helper/ProgressHelper.php +++ b/src/Symfony/Component/Console/Helper/ProgressHelper.php @@ -21,20 +21,20 @@ use Symfony\Component\Console\Output\OutputInterface; */ class ProgressHelper extends Helper { - const FORMAT_QUIET = ' %percent%%'; - const FORMAT_NORMAL = ' %current%/%max% [%bar%] %percent%%'; - const FORMAT_VERBOSE = ' %current%/%max% [%bar%] %percent%% Elapsed: %elapsed%'; - const FORMAT_QUIET_NOMAX = ' %current%'; - const FORMAT_NORMAL_NOMAX = ' %current% [%bar%]'; + const FORMAT_QUIET = ' %percent%%'; + const FORMAT_NORMAL = ' %current%/%max% [%bar%] %percent%%'; + const FORMAT_VERBOSE = ' %current%/%max% [%bar%] %percent%% Elapsed: %elapsed%'; + const FORMAT_QUIET_NOMAX = ' %current%'; + const FORMAT_NORMAL_NOMAX = ' %current% [%bar%]'; const FORMAT_VERBOSE_NOMAX = ' %current% [%bar%] Elapsed: %elapsed%'; // options - private $barWidth = 28; - private $barChar = '='; + private $barWidth = 28; + private $barChar = '='; private $emptyBarChar = '-'; private $progressChar = '>'; - private $format = null; - private $redrawFreq = 1; + private $format = null; + private $redrawFreq = 1; private $lastMessagesLength; private $barCharOriginal; @@ -92,7 +92,7 @@ class ProgressHelper extends Helper */ private $widths = array( 'current' => 4, - 'max' => 4, + 'max' => 4, 'percent' => 3, 'elapsed' => 6, ); @@ -183,9 +183,9 @@ class ProgressHelper extends Helper public function start(OutputInterface $output, $max = null) { $this->startTime = time(); - $this->current = 0; - $this->max = (int) $max; - $this->output = $output; + $this->current = 0; + $this->max = (int) $max; + $this->output = $output; $this->lastMessagesLength = 0; $this->barCharOriginal = ''; @@ -332,11 +332,11 @@ class ProgressHelper extends Helper } if ($this->max > 0) { - $this->widths['max'] = $this->strlen($this->max); + $this->widths['max'] = $this->strlen($this->max); $this->widths['current'] = $this->widths['max']; } else { $this->barCharOriginal = $this->barChar; - $this->barChar = $this->emptyBarChar; + $this->barChar = $this->emptyBarChar; } } @@ -349,7 +349,7 @@ class ProgressHelper extends Helper */ private function generate($finish = false) { - $vars = array(); + $vars = array(); $percent = 0; if ($this->max > 0) { $percent = (float) $this->current / $this->max; diff --git a/src/Symfony/Component/Console/Input/InputArgument.php b/src/Symfony/Component/Console/Input/InputArgument.php index bf9c99e142..56bb9fbee6 100644 --- a/src/Symfony/Component/Console/Input/InputArgument.php +++ b/src/Symfony/Component/Console/Input/InputArgument.php @@ -49,8 +49,8 @@ class InputArgument throw new \InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode)); } - $this->name = $name; - $this->mode = $mode; + $this->name = $name; + $this->mode = $mode; $this->description = $description; $this->setDefault($default); diff --git a/src/Symfony/Component/Console/Input/InputDefinition.php b/src/Symfony/Component/Console/Input/InputDefinition.php index d45835cf75..8a989eed7c 100644 --- a/src/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/Symfony/Component/Console/Input/InputDefinition.php @@ -86,9 +86,9 @@ class InputDefinition */ public function setArguments($arguments = array()) { - $this->arguments = array(); - $this->requiredCount = 0; - $this->hasOptional = false; + $this->arguments = array(); + $this->requiredCount = 0; + $this->hasOptional = false; $this->hasAnArrayArgument = false; $this->addArguments($arguments); } diff --git a/src/Symfony/Component/Console/Input/InputOption.php b/src/Symfony/Component/Console/Input/InputOption.php index 18d05e9064..ece38a1782 100644 --- a/src/Symfony/Component/Console/Input/InputOption.php +++ b/src/Symfony/Component/Console/Input/InputOption.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Console\Input; */ class InputOption { - const VALUE_NONE = 1; + const VALUE_NONE = 1; const VALUE_REQUIRED = 2; const VALUE_OPTIONAL = 4; const VALUE_IS_ARRAY = 8; @@ -77,9 +77,9 @@ class InputOption throw new \InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode)); } - $this->name = $name; - $this->shortcut = $shortcut; - $this->mode = $mode; + $this->name = $name; + $this->shortcut = $shortcut; + $this->mode = $mode; $this->description = $description; if ($this->isArray() && !$this->acceptValue()) { diff --git a/src/Symfony/Component/Console/Output/OutputInterface.php b/src/Symfony/Component/Console/Output/OutputInterface.php index ad128c68c7..ddf6c0e958 100644 --- a/src/Symfony/Component/Console/Output/OutputInterface.php +++ b/src/Symfony/Component/Console/Output/OutputInterface.php @@ -22,15 +22,15 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface; */ interface OutputInterface { - const VERBOSITY_QUIET = 0; - const VERBOSITY_NORMAL = 1; - const VERBOSITY_VERBOSE = 2; + const VERBOSITY_QUIET = 0; + const VERBOSITY_NORMAL = 1; + const VERBOSITY_VERBOSE = 2; const VERBOSITY_VERY_VERBOSE = 3; - const VERBOSITY_DEBUG = 4; + const VERBOSITY_DEBUG = 4; const OUTPUT_NORMAL = 0; - const OUTPUT_RAW = 1; - const OUTPUT_PLAIN = 2; + const OUTPUT_RAW = 1; + const OUTPUT_PLAIN = 2; /** * Writes a message to the output. diff --git a/src/Symfony/Component/CssSelector/Parser/Token.php b/src/Symfony/Component/CssSelector/Parser/Token.php index 4adfca889d..ba5d657f7b 100644 --- a/src/Symfony/Component/CssSelector/Parser/Token.php +++ b/src/Symfony/Component/CssSelector/Parser/Token.php @@ -21,13 +21,13 @@ namespace Symfony\Component\CssSelector\Parser; */ class Token { - const TYPE_FILE_END = 'eof'; - const TYPE_DELIMITER = 'delimiter'; + const TYPE_FILE_END = 'eof'; + const TYPE_DELIMITER = 'delimiter'; const TYPE_WHITESPACE = 'whitespace'; const TYPE_IDENTIFIER = 'identifier'; - const TYPE_HASH = 'hash'; - const TYPE_NUMBER = 'number'; - const TYPE_STRING = 'string'; + const TYPE_HASH = 'hash'; + const TYPE_NUMBER = 'number'; + const TYPE_STRING = 'string'; /** * @var int diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php index 1b1f00f286..31d24b28ef 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php @@ -31,13 +31,13 @@ class AttributeMatchingExtension extends AbstractExtension { return array( 'exists' => array($this, 'translateExists'), - '=' => array($this, 'translateEquals'), - '~=' => array($this, 'translateIncludes'), - '|=' => array($this, 'translateDashMatch'), - '^=' => array($this, 'translatePrefixMatch'), - '$=' => array($this, 'translateSuffixMatch'), - '*=' => array($this, 'translateSubstringMatch'), - '!=' => array($this, 'translateDifferent'), + '=' => array($this, 'translateEquals'), + '~=' => array($this, 'translateIncludes'), + '|=' => array($this, 'translateDashMatch'), + '^=' => array($this, 'translatePrefixMatch'), + '$=' => array($this, 'translateSuffixMatch'), + '*=' => array($this, 'translateSubstringMatch'), + '!=' => array($this, 'translateDifferent'), ); } diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php index ff8f333ada..e849474383 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php @@ -34,12 +34,12 @@ class FunctionExtension extends AbstractExtension public function getFunctionTranslators() { return array( - 'nth-child' => array($this, 'translateNthChild'), - 'nth-last-child' => array($this, 'translateNthLastChild'), - 'nth-of-type' => array($this, 'translateNthOfType'), + 'nth-child' => array($this, 'translateNthChild'), + 'nth-last-child' => array($this, 'translateNthLastChild'), + 'nth-of-type' => array($this, 'translateNthOfType'), 'nth-last-of-type' => array($this, 'translateNthLastOfType'), - 'contains' => array($this, 'translateContains'), - 'lang' => array($this, 'translateLang'), + 'contains' => array($this, 'translateContains'), + 'lang' => array($this, 'translateLang'), ); } diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php index aef80523dd..71ed4b4a79 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php @@ -45,14 +45,14 @@ class HtmlExtension extends AbstractExtension public function getPseudoClassTranslators() { return array( - 'checked' => array($this, 'translateChecked'), - 'link' => array($this, 'translateLink'), + 'checked' => array($this, 'translateChecked'), + 'link' => array($this, 'translateLink'), 'disabled' => array($this, 'translateDisabled'), - 'enabled' => array($this, 'translateEnabled'), + 'enabled' => array($this, 'translateEnabled'), 'selected' => array($this, 'translateSelected'), - 'invalid' => array($this, 'translateInvalid'), - 'hover' => array($this, 'translateHover'), - 'visited' => array($this, 'translateVisited'), + 'invalid' => array($this, 'translateInvalid'), + 'hover' => array($this, 'translateHover'), + 'visited' => array($this, 'translateVisited'), ); } diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php index d71baaa96b..302f373400 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php @@ -25,8 +25,8 @@ use Symfony\Component\CssSelector\XPath\XPathExpr; */ class NodeExtension extends AbstractExtension { - const ELEMENT_NAME_IN_LOWER_CASE = 1; - const ATTRIBUTE_NAME_IN_LOWER_CASE = 2; + const ELEMENT_NAME_IN_LOWER_CASE = 1; + const ATTRIBUTE_NAME_IN_LOWER_CASE = 2; const ATTRIBUTE_VALUE_IN_LOWER_CASE = 4; /** @@ -79,15 +79,15 @@ class NodeExtension extends AbstractExtension public function getNodeTranslators() { return array( - 'Selector' => array($this, 'translateSelector'), + 'Selector' => array($this, 'translateSelector'), 'CombinedSelector' => array($this, 'translateCombinedSelector'), - 'Negation' => array($this, 'translateNegation'), - 'Function' => array($this, 'translateFunction'), - 'Pseudo' => array($this, 'translatePseudo'), - 'Attribute' => array($this, 'translateAttribute'), - 'Class' => array($this, 'translateClass'), - 'Hash' => array($this, 'translateHash'), - 'Element' => array($this, 'translateElement'), + 'Negation' => array($this, 'translateNegation'), + 'Function' => array($this, 'translateFunction'), + 'Pseudo' => array($this, 'translatePseudo'), + 'Attribute' => array($this, 'translateAttribute'), + 'Class' => array($this, 'translateClass'), + 'Hash' => array($this, 'translateHash'), + 'Element' => array($this, 'translateElement'), ); } diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php index d230dd7c48..d59857225c 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php @@ -30,14 +30,14 @@ class PseudoClassExtension extends AbstractExtension public function getPseudoClassTranslators() { return array( - 'root' => array($this, 'translateRoot'), - 'first-child' => array($this, 'translateFirstChild'), - 'last-child' => array($this, 'translateLastChild'), + 'root' => array($this, 'translateRoot'), + 'first-child' => array($this, 'translateFirstChild'), + 'last-child' => array($this, 'translateLastChild'), 'first-of-type' => array($this, 'translateFirstOfType'), - 'last-of-type' => array($this, 'translateLastOfType'), - 'only-child' => array($this, 'translateOnlyChild'), - 'only-of-type' => array($this, 'translateOnlyOfType'), - 'empty' => array($this, 'translateEmpty'), + 'last-of-type' => array($this, 'translateLastOfType'), + 'only-child' => array($this, 'translateOnlyChild'), + 'only-of-type' => array($this, 'translateOnlyOfType'), + 'empty' => array($this, 'translateEmpty'), ); } diff --git a/src/Symfony/Component/Debug/ErrorHandler.php b/src/Symfony/Component/Debug/ErrorHandler.php index d0566ae18e..c4954bda7a 100644 --- a/src/Symfony/Component/Debug/ErrorHandler.php +++ b/src/Symfony/Component/Debug/ErrorHandler.php @@ -27,19 +27,19 @@ class ErrorHandler const TYPE_DEPRECATION = -100; private $levels = array( - E_WARNING => 'Warning', - E_NOTICE => 'Notice', - E_USER_ERROR => 'User Error', - E_USER_WARNING => 'User Warning', - E_USER_NOTICE => 'User Notice', - E_STRICT => 'Runtime Notice', + E_WARNING => 'Warning', + E_NOTICE => 'Notice', + E_USER_ERROR => 'User Error', + E_USER_WARNING => 'User Warning', + E_USER_NOTICE => 'User Notice', + E_STRICT => 'Runtime Notice', E_RECOVERABLE_ERROR => 'Catchable Fatal Error', - E_DEPRECATED => 'Deprecated', - E_USER_DEPRECATED => 'User Deprecated', - E_ERROR => 'Error', - E_CORE_ERROR => 'Core Error', - E_COMPILE_ERROR => 'Compile Error', - E_PARSE => 'Parse', + E_DEPRECATED => 'Deprecated', + E_USER_DEPRECATED => 'User Deprecated', + E_ERROR => 'Error', + E_CORE_ERROR => 'Core Error', + E_COMPILE_ERROR => 'Compile Error', + E_PARSE => 'Parse', ); private $level; diff --git a/src/Symfony/Component/Debug/Exception/FlattenException.php b/src/Symfony/Component/Debug/Exception/FlattenException.php index 878ac4d774..7e2f5f67d0 100644 --- a/src/Symfony/Component/Debug/Exception/FlattenException.php +++ b/src/Symfony/Component/Debug/Exception/FlattenException.php @@ -66,8 +66,8 @@ class FlattenException foreach (array_merge(array($this), $this->getAllPrevious()) as $exception) { $exceptions[] = array( 'message' => $exception->getMessage(), - 'class' => $exception->getClass(), - 'trace' => $exception->getTrace(), + 'class' => $exception->getClass(), + 'trace' => $exception->getTrace(), ); } @@ -208,14 +208,14 @@ class FlattenException { $this->trace = array(); $this->trace[] = array( - 'namespace' => '', + 'namespace' => '', 'short_class' => '', - 'class' => '', - 'type' => '', - 'function' => '', - 'file' => $file, - 'line' => $line, - 'args' => array(), + 'class' => '', + 'type' => '', + 'function' => '', + 'file' => $file, + 'line' => $line, + 'args' => array(), ); foreach ($trace as $entry) { $class = ''; @@ -227,14 +227,14 @@ class FlattenException } $this->trace[] = array( - 'namespace' => $namespace, + 'namespace' => $namespace, 'short_class' => $class, - 'class' => isset($entry['class']) ? $entry['class'] : '', - 'type' => isset($entry['type']) ? $entry['type'] : '', - 'function' => isset($entry['function']) ? $entry['function'] : null, - 'file' => isset($entry['file']) ? $entry['file'] : null, - 'line' => isset($entry['line']) ? $entry['line'] : null, - 'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : array(), + 'class' => isset($entry['class']) ? $entry['class'] : '', + 'type' => isset($entry['type']) ? $entry['type'] : '', + 'function' => isset($entry['function']) ? $entry['function'] : null, + 'file' => isset($entry['file']) ? $entry['file'] : null, + 'line' => isset($entry['line']) ? $entry['line'] : null, + 'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : array(), ); } } diff --git a/src/Symfony/Component/Debug/ExceptionHandler.php b/src/Symfony/Component/Debug/ExceptionHandler.php index b83c13b12d..74425cb760 100644 --- a/src/Symfony/Component/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/Debug/ExceptionHandler.php @@ -298,7 +298,7 @@ EOF; $formattedValue = sprintf("object(%s)", $this->abbrClass($item[1])); } elseif ('array' === $item[0]) { $formattedValue = sprintf("array(%s)", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); - } elseif ('string' === $item[0]) { + } elseif ('string' === $item[0]) { $formattedValue = sprintf("'%s'", htmlspecialchars($item[1], ENT_QUOTES | ENT_SUBSTITUTE, $this->charset)); } elseif ('null' === $item[0]) { $formattedValue = 'null'; diff --git a/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php b/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php index 0c0f42d80b..df95d8dfd5 100644 --- a/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php +++ b/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php @@ -162,8 +162,8 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase 'message' => 'test', 'class' => 'Exception', 'trace' => array(array( - 'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => '', 'file' => 'foo.php', 'line' => 123, - 'args' => array(), + 'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => '', 'file' => 'foo.php', 'line' => 123, + 'args' => array(), )), ), ), $flattened->toArray()); @@ -214,14 +214,14 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase 'class' => 'Exception', 'trace' => array( array( - 'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => '', - 'file' => 'foo.php', 'line' => 123, - 'args' => array(), + 'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => '', + 'file' => 'foo.php', 'line' => 123, + 'args' => array(), ), array( - 'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => 'test', - 'file' => __FILE__, 'line' => 123, - 'args' => array( + 'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => 'test', + 'file' => __FILE__, 'line' => 123, + 'args' => array( array( 'incomplete-object', 'BogusTestClass', ), diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php index f488052596..10718533bb 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php @@ -59,7 +59,7 @@ class AnalyzeServiceReferencesPass implements RepeatablePassInterface public function process(ContainerBuilder $container) { $this->container = $container; - $this->graph = $container->getCompiler()->getServiceReferenceGraph(); + $this->graph = $container->getCompiler()->getServiceReferenceGraph(); $this->graph->clear(); foreach ($container->getDefinitions() as $id => $definition) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php index e81110dc01..ca2c62a0a0 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php @@ -58,8 +58,8 @@ class CheckCircularReferencesPass implements CompilerPassInterface private function checkOutEdges(array $edges) { foreach ($edges as $edge) { - $node = $edge->getDestNode(); - $id = $node->getId(); + $node = $edge->getDestNode(); + $id = $node->getId(); if (empty($this->checkedNodes[$id])) { $searchKey = array_search($id, $this->currentPath); diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index f105a6d250..0d1be8f051 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -87,12 +87,12 @@ class Container implements IntrospectableContainerInterface { $this->parameterBag = null === $parameterBag ? new ParameterBag() : $parameterBag; - $this->services = array(); - $this->aliases = array(); - $this->scopes = array(); - $this->scopeChildren = array(); + $this->services = array(); + $this->aliases = array(); + $this->scopes = array(); + $this->scopeChildren = array(); $this->scopedServices = array(); - $this->scopeStacks = array(); + $this->scopeStacks = array(); } /** diff --git a/src/Symfony/Component/DependencyInjection/ContainerInterface.php b/src/Symfony/Component/DependencyInjection/ContainerInterface.php index 77ee42b57c..a70f13c2aa 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerInterface.php +++ b/src/Symfony/Component/DependencyInjection/ContainerInterface.php @@ -26,10 +26,10 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; interface ContainerInterface { const EXCEPTION_ON_INVALID_REFERENCE = 1; - const NULL_ON_INVALID_REFERENCE = 2; - const IGNORE_ON_INVALID_REFERENCE = 3; - const SCOPE_CONTAINER = 'container'; - const SCOPE_PROTOTYPE = 'prototype'; + const NULL_ON_INVALID_REFERENCE = 2; + const IGNORE_ON_INVALID_REFERENCE = 3; + const SCOPE_CONTAINER = 'container'; + const SCOPE_PROTOTYPE = 'prototype'; /** * Sets a service. diff --git a/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php index 1ffe142af4..abbdd04fe5 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php @@ -34,8 +34,8 @@ class GraphvizDumper extends Dumper private $edges; private $options = array( 'graph' => array('ratio' => 'compress'), - 'node' => array('fontsize' => 11, 'fontname' => 'Arial', 'shape' => 'record'), - 'edge' => array('fontsize' => 9, 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => 0.5), + 'node' => array('fontsize' => 11, 'fontname' => 'Arial', 'shape' => 'record'), + 'edge' => array('fontsize' => 9, 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => 0.5), 'node.instance' => array('fillcolor' => '#9999ff', 'style' => 'filled'), 'node.definition' => array('fillcolor' => '#eeeeee'), 'node.missing' => array('fillcolor' => '#ff9999', 'style' => 'filled'), diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index b8addc10f5..9189c45ca5 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -96,7 +96,7 @@ class PhpDumper extends Dumper public function dump(array $options = array()) { $options = array_merge(array( - 'class' => 'ProjectServiceContainer', + 'class' => 'ProjectServiceContainer', 'base_class' => 'Container', ), $options); @@ -333,9 +333,9 @@ class PhpDumper extends Dumper throw new InvalidArgumentException(sprintf('"%s" is not a valid class name for the "%s" service.', $class, $id)); } - $simple = $this->isSimpleInstance($id, $definition); + $simple = $this->isSimpleInstance($id, $definition); $isProxyCandidate = $this->getProxyDumper()->isProxyCandidate($definition); - $instantiation = ''; + $instantiation = ''; if (!$isProxyCandidate && ContainerInterface::SCOPE_CONTAINER === $definition->getScope()) { $instantiation = "\$this->services['$id'] = ".($simple ? '' : '$instance'); @@ -546,17 +546,17 @@ EOF; } if ($definition->isLazy()) { - $lazyInitialization = '$lazyLoad = true'; + $lazyInitialization = '$lazyLoad = true'; $lazyInitializationDoc = "\n * @param bool \$lazyLoad whether to try lazy-loading the service with a proxy\n *"; } else { - $lazyInitialization = ''; + $lazyInitialization = ''; $lazyInitializationDoc = ''; } // with proxies, for 5.3.3 compatibility, the getter must be public to be accessible to the initializer $isProxyCandidate = $this->getProxyDumper()->isProxyCandidate($definition); - $visibility = $isProxyCandidate ? 'public' : 'protected'; - $code = <<compile(); - $classesPath = realpath(__DIR__.'/Fixtures/includes/classes.php'); + $classesPath = realpath(__DIR__.'/Fixtures/includes/classes.php'); $matchingResources = array_filter( $container->getResources(), function (ResourceInterface $resource) use ($classesPath) { @@ -650,16 +650,16 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase public function testPrivateServiceUser() { - $fooDefinition = new Definition('BarClass'); + $fooDefinition = new Definition('BarClass'); $fooUserDefinition = new Definition('BarUserClass', array(new Reference('bar'))); - $container = new ContainerBuilder(); + $container = new ContainerBuilder(); $container->setResourceTracking(false); $fooDefinition->setPublic(false); $container->addDefinitions(array( - 'bar' => $fooDefinition, - 'bar_user' => $fooUserDefinition, + 'bar' => $fooDefinition, + 'bar_user' => $fooUserDefinition, )); $container->compile(); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php index 3db11504ad..f7746be804 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php @@ -41,8 +41,8 @@ class GraphvizDumperTest extends \PHPUnit_Framework_TestCase $dumper = new GraphvizDumper($container); $this->assertEquals($dumper->dump(array( 'graph' => array('ratio' => 'normal'), - 'node' => array('fontsize' => 13, 'fontname' => 'Verdana', 'shape' => 'square'), - 'edge' => array('fontsize' => 12, 'fontname' => 'Verdana', 'color' => 'white', 'arrowhead' => 'closed', 'arrowsize' => 1), + 'node' => array('fontsize' => 13, 'fontname' => 'Verdana', 'shape' => 'square'), + 'edge' => array('fontsize' => 12, 'fontname' => 'Verdana', 'color' => 'white', 'arrowhead' => 'closed', 'arrowsize' => 1), 'node.instance' => array('fillcolor' => 'green', 'style' => 'empty'), 'node.definition' => array('fillcolor' => 'grey'), 'node.missing' => array('fillcolor' => 'red', 'style' => 'empty'), diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container8.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container8.php index eec856412b..f0b4ca9330 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container8.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container8.php @@ -4,9 +4,9 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; $container = new ContainerBuilder(new ParameterBag(array( - 'FOO' => '%baz%', - 'baz' => 'bar', - 'bar' => 'foo is %%foo bar', + 'FOO' => '%baz%', + 'baz' => 'bar', + 'bar' => 'foo is %%foo bar', 'escape' => '@escapeme', 'values' => array(true, false, null, 0, 1000.3, 'true', 'false', 'null'), ))); diff --git a/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php b/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php index 5fb2026964..bc0c5800e1 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php @@ -26,9 +26,9 @@ class RealServiceInstantiatorTest extends \PHPUnit_Framework_TestCase public function testInstantiateProxy() { $instantiator = new RealServiceInstantiator(); - $instance = new \stdClass(); - $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); - $callback = function () use ($instance) { + $instance = new \stdClass(); + $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); + $callback = function () use ($instance) { return $instance; }; diff --git a/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/NullDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/NullDumperTest.php index 646673662a..4eb8320b64 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/NullDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/NullDumperTest.php @@ -25,7 +25,7 @@ class NullDumperTest extends \PHPUnit_Framework_TestCase { public function testNullDumper() { - $dumper = new NullDumper(); + $dumper = new NullDumper(); $definition = new Definition('stdClass'); $this->assertFalse($dumper->isProxyCandidate($definition)); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php index 220ad7fe4d..6f5b63d4ac 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php @@ -34,7 +34,7 @@ class IniFileLoaderTest extends \PHPUnit_Framework_TestCase } $this->container = new ContainerBuilder(); - $this->loader = new IniFileLoader($this->container, new FileLocator(self::$fixturesPath.'/ini')); + $this->loader = new IniFileLoader($this->container, new FileLocator(self::$fixturesPath.'/ini')); } /** diff --git a/src/Symfony/Component/DomCrawler/Tests/FormTest.php b/src/Symfony/Component/DomCrawler/Tests/FormTest.php index 4a556c6eea..bade3dbcaa 100644 --- a/src/Symfony/Component/DomCrawler/Tests/FormTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/FormTest.php @@ -772,8 +772,8 @@ class FormTest extends \PHPUnit_Framework_TestCase $registry->set('foo[bar][baz]', 'fbb'); $registry->set('foo', array( - 2 => 2, - 3 => 3, + 2 => 2, + 3 => 3, 'bar' => array( 'baz' => 'fbb', ), diff --git a/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php index 375e0f1c3b..b543de5eff 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php @@ -99,7 +99,7 @@ class EventDispatcherTest extends \PHPUnit_Framework_TestCase $this->dispatcher->addListener('post.foo', $listener6, 10); $expected = array( - 'pre.foo' => array($listener3, $listener2, $listener1), + 'pre.foo' => array($listener3, $listener2, $listener1), 'post.foo' => array($listener6, $listener5, $listener4), ); diff --git a/src/Symfony/Component/Finder/Adapter/AbstractAdapter.php b/src/Symfony/Component/Finder/Adapter/AbstractAdapter.php index bdb04f5352..a72bf65329 100644 --- a/src/Symfony/Component/Finder/Adapter/AbstractAdapter.php +++ b/src/Symfony/Component/Finder/Adapter/AbstractAdapter.php @@ -19,20 +19,20 @@ namespace Symfony\Component\Finder\Adapter; abstract class AbstractAdapter implements AdapterInterface { protected $followLinks = false; - protected $mode = 0; - protected $minDepth = 0; - protected $maxDepth = PHP_INT_MAX; - protected $exclude = array(); - protected $names = array(); - protected $notNames = array(); - protected $contains = array(); + protected $mode = 0; + protected $minDepth = 0; + protected $maxDepth = PHP_INT_MAX; + protected $exclude = array(); + protected $names = array(); + protected $notNames = array(); + protected $contains = array(); protected $notContains = array(); - protected $sizes = array(); - protected $dates = array(); - protected $filters = array(); - protected $sort = false; - protected $paths = array(); - protected $notPaths = array(); + protected $sizes = array(); + protected $dates = array(); + protected $filters = array(); + protected $sort = false; + protected $paths = array(); + protected $notPaths = array(); protected $ignoreUnreadableDirs = false; private static $areSupported = array(); diff --git a/src/Symfony/Component/Finder/Expression/Expression.php b/src/Symfony/Component/Finder/Expression/Expression.php index 8559b33e31..900260751e 100644 --- a/src/Symfony/Component/Finder/Expression/Expression.php +++ b/src/Symfony/Component/Finder/Expression/Expression.php @@ -17,7 +17,7 @@ namespace Symfony\Component\Finder\Expression; class Expression implements ValueInterface { const TYPE_REGEX = 1; - const TYPE_GLOB = 2; + const TYPE_GLOB = 2; /** * @var ValueInterface diff --git a/src/Symfony/Component/Finder/Expression/Regex.php b/src/Symfony/Component/Finder/Expression/Regex.php index c019d4a1a2..a249fc2546 100644 --- a/src/Symfony/Component/Finder/Expression/Regex.php +++ b/src/Symfony/Component/Finder/Expression/Regex.php @@ -17,10 +17,10 @@ namespace Symfony\Component\Finder\Expression; class Regex implements ValueInterface { const START_FLAG = '^'; - const END_FLAG = '$'; - const BOUNDARY = '~'; - const JOKER = '.*'; - const ESCAPING = '\\'; + const END_FLAG = '$'; + const BOUNDARY = '~'; + const JOKER = '.*'; + const ESCAPING = '\\'; /** * @var string @@ -63,7 +63,7 @@ class Regex implements ValueInterface { if (preg_match('/^(.{3,}?)([imsxuADU]*)$/', $expr, $m)) { $start = substr($m[1], 0, 1); - $end = substr($m[1], -1); + $end = substr($m[1], -1); if ( ($start === $end && !preg_match('/[*?[:alnum:] \\\\]/', $start)) diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php index 9dccf6e655..f17f57c16e 100644 --- a/src/Symfony/Component/Finder/Finder.php +++ b/src/Symfony/Component/Finder/Finder.php @@ -37,24 +37,24 @@ class Finder implements \IteratorAggregate, \Countable const IGNORE_VCS_FILES = 1; const IGNORE_DOT_FILES = 2; - private $mode = 0; - private $names = array(); - private $notNames = array(); - private $exclude = array(); - private $filters = array(); - private $depths = array(); - private $sizes = array(); + private $mode = 0; + private $names = array(); + private $notNames = array(); + private $exclude = array(); + private $filters = array(); + private $depths = array(); + private $sizes = array(); private $followLinks = false; - private $sort = false; - private $ignore = 0; - private $dirs = array(); - private $dates = array(); - private $iterators = array(); - private $contains = array(); + private $sort = false; + private $ignore = 0; + private $dirs = array(); + private $dates = array(); + private $iterators = array(); + private $contains = array(); private $notContains = array(); - private $adapters = array(); - private $paths = array(); - private $notPaths = array(); + private $adapters = array(); + private $paths = array(); + private $notPaths = array(); private $ignoreUnreadableDirs = false; private static $vcsPatterns = array('.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'); @@ -97,7 +97,7 @@ class Finder implements \IteratorAggregate, \Countable public function addAdapter(AdapterInterface $adapter, $priority = 0) { $this->adapters[$adapter->getName()] = array( - 'adapter' => $adapter, + 'adapter' => $adapter, 'priority' => $priority, 'selected' => false, ); diff --git a/src/Symfony/Component/Finder/Iterator/FilePathsIterator.php b/src/Symfony/Component/Finder/Iterator/FilePathsIterator.php index 48634f27da..4da2f5be01 100644 --- a/src/Symfony/Component/Finder/Iterator/FilePathsIterator.php +++ b/src/Symfony/Component/Finder/Iterator/FilePathsIterator.php @@ -51,7 +51,7 @@ class FilePathsIterator extends \ArrayIterator */ public function __construct(array $paths, $baseDir) { - $this->baseDir = $baseDir; + $this->baseDir = $baseDir; $this->baseDirLength = strlen($baseDir); parent::__construct($paths); diff --git a/src/Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php b/src/Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php index 985475e59d..e1c2e8f84c 100644 --- a/src/Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php +++ b/src/Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Finder\Iterator; */ class FileTypeFilterIterator extends FilterIterator { - const ONLY_FILES = 1; + const ONLY_FILES = 1; const ONLY_DIRECTORIES = 2; private $mode; diff --git a/src/Symfony/Component/Finder/Iterator/PathFilterIterator.php b/src/Symfony/Component/Finder/Iterator/PathFilterIterator.php index db86faa2c9..4150b3663e 100644 --- a/src/Symfony/Component/Finder/Iterator/PathFilterIterator.php +++ b/src/Symfony/Component/Finder/Iterator/PathFilterIterator.php @@ -59,7 +59,7 @@ class PathFilterIterator extends MultiplePcreFilterIterator * PCRE patterns are left unchanged. * * Default conversion: - * 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/' + * 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/' * * Use only / as directory separator (on Windows also). * diff --git a/src/Symfony/Component/Finder/Shell/Command.php b/src/Symfony/Component/Finder/Shell/Command.php index 350ff29ea4..de701ab4e8 100644 --- a/src/Symfony/Component/Finder/Shell/Command.php +++ b/src/Symfony/Component/Finder/Shell/Command.php @@ -44,7 +44,7 @@ class Command public function __construct(Command $parent = null) { $this->parent = $parent; - $this->bits = array(); + $this->bits = array(); $this->labels = array(); } diff --git a/src/Symfony/Component/Finder/Shell/Shell.php b/src/Symfony/Component/Finder/Shell/Shell.php index d17f2fac35..6d7bff33b4 100644 --- a/src/Symfony/Component/Finder/Shell/Shell.php +++ b/src/Symfony/Component/Finder/Shell/Shell.php @@ -16,11 +16,11 @@ namespace Symfony\Component\Finder\Shell; */ class Shell { - const TYPE_UNIX = 1; - const TYPE_DARWIN = 2; - const TYPE_CYGWIN = 3; + const TYPE_UNIX = 1; + const TYPE_DARWIN = 2; + const TYPE_CYGWIN = 3; const TYPE_WINDOWS = 4; - const TYPE_BSD = 5; + const TYPE_BSD = 5; /** * @var string|null diff --git a/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/Symfony/Component/Finder/Tests/FinderTest.php index 72679c6b9b..1b5d8da301 100644 --- a/src/Symfony/Component/Finder/Tests/FinderTest.php +++ b/src/Symfony/Component/Finder/Tests/FinderTest.php @@ -603,7 +603,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testAdaptersChaining() { - $iterator = new \ArrayIterator(array()); + $iterator = new \ArrayIterator(array()); $filenames = $this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')); foreach ($filenames as $file) { $iterator->append(new \Symfony\Component\Finder\SplFileInfo($file, null, null)); diff --git a/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php index d3be8c6489..66abdc1b42 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php @@ -50,31 +50,31 @@ class FilecontentFilterIteratorTest extends IteratorTestCase $inner = new MockFileListIterator(); $inner[] = new MockSplFileInfo(array( - 'name' => 'a.txt', + 'name' => 'a.txt', 'contents' => 'Lorem ipsum...', - 'type' => 'file', - 'mode' => 'r+',) + 'type' => 'file', + 'mode' => 'r+',) ); $inner[] = new MockSplFileInfo(array( - 'name' => 'b.yml', + 'name' => 'b.yml', 'contents' => 'dolor sit...', - 'type' => 'file', - 'mode' => 'r+',) + 'type' => 'file', + 'mode' => 'r+',) ); $inner[] = new MockSplFileInfo(array( - 'name' => 'some/other/dir/third.php', + 'name' => 'some/other/dir/third.php', 'contents' => 'amet...', - 'type' => 'file', - 'mode' => 'r+',) + 'type' => 'file', + 'mode' => 'r+',) ); $inner[] = new MockSplFileInfo(array( - 'name' => 'unreadable-file.txt', + 'name' => 'unreadable-file.txt', 'contents' => false, - 'type' => 'file', - 'mode' => 'r+',) + 'type' => 'file', + 'mode' => 'r+',) ); return array( diff --git a/src/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php b/src/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php index c8608bf2d3..f2e8f8e2fd 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php @@ -14,13 +14,13 @@ namespace Symfony\Component\Finder\Tests\Iterator; class MockSplFileInfo extends \SplFileInfo { const TYPE_DIRECTORY = 1; - const TYPE_FILE = 2; - const TYPE_UNKNOWN = 3; + const TYPE_FILE = 2; + const TYPE_UNKNOWN = 3; - private $contents = null; - private $mode = null; - private $type = null; - private $relativePath = null; + private $contents = null; + private $mode = null; + private $type = null; + private $relativePath = null; private $relativePathname = null; public function __construct($param) @@ -29,11 +29,11 @@ class MockSplFileInfo extends \SplFileInfo parent::__construct($param); } elseif (is_array($param)) { $defaults = array( - 'name' => 'file.txt', - 'contents' => null, - 'mode' => null, - 'type' => null, - 'relativePath' => null, + 'name' => 'file.txt', + 'contents' => null, + 'mode' => null, + 'type' => null, + 'relativePath' => null, 'relativePathname' => null, ); $defaults = array_merge($defaults, $param); diff --git a/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php index c64ec2b1f5..579beed2ed 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php @@ -30,38 +30,38 @@ class PathFilterIteratorTest extends IteratorTestCase //PATH: A/B/C/abc.dat $inner[] = new MockSplFileInfo(array( - 'name' => 'abc.dat', - 'relativePathname' => 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat', + 'name' => 'abc.dat', + 'relativePathname' => 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat', )); //PATH: A/B/ab.dat $inner[] = new MockSplFileInfo(array( - 'name' => 'ab.dat', - 'relativePathname' => 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat', + 'name' => 'ab.dat', + 'relativePathname' => 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat', )); //PATH: A/a.dat $inner[] = new MockSplFileInfo(array( - 'name' => 'a.dat', - 'relativePathname' => 'A'.DIRECTORY_SEPARATOR.'a.dat', + 'name' => 'a.dat', + 'relativePathname' => 'A'.DIRECTORY_SEPARATOR.'a.dat', )); //PATH: copy/A/B/C/abc.dat.copy $inner[] = new MockSplFileInfo(array( - 'name' => 'abc.dat.copy', - 'relativePathname' => 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat', + 'name' => 'abc.dat.copy', + 'relativePathname' => 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat', )); //PATH: copy/A/B/ab.dat.copy $inner[] = new MockSplFileInfo(array( - 'name' => 'ab.dat.copy', - 'relativePathname' => 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat', + 'name' => 'ab.dat.copy', + 'relativePathname' => 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat', )); //PATH: copy/A/a.dat.copy $inner[] = new MockSplFileInfo(array( - 'name' => 'a.dat.copy', - 'relativePathname' => 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'a.dat', + 'name' => 'a.dat.copy', + 'relativePathname' => 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'a.dat', )); return array( diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php index eeeb9fafac..e36be12009 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php @@ -63,12 +63,12 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer { if (null === $dateTime) { return array_intersect_key(array( - 'year' => '', - 'month' => '', - 'day' => '', - 'hour' => '', - 'minute' => '', - 'second' => '', + 'year' => '', + 'month' => '', + 'day' => '', + 'hour' => '', + 'minute' => '', + 'second' => '', ), array_flip($this->fields)); } @@ -86,12 +86,12 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer } $result = array_intersect_key(array( - 'year' => $dateTime->format('Y'), - 'month' => $dateTime->format('m'), - 'day' => $dateTime->format('d'), - 'hour' => $dateTime->format('H'), - 'minute' => $dateTime->format('i'), - 'second' => $dateTime->format('s'), + 'year' => $dateTime->format('Y'), + 'month' => $dateTime->format('m'), + 'day' => $dateTime->format('d'), + 'hour' => $dateTime->format('H'), + 'minute' => $dateTime->format('i'), + 'second' => $dateTime->format('s'), ), array_flip($this->fields)); if (!$this->pad) { diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php index 8b30c7f696..3bf9581cd0 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php @@ -23,13 +23,13 @@ use Symfony\Component\Form\Exception\TransformationFailedException; */ class NumberToLocalizedStringTransformer implements DataTransformerInterface { - const ROUND_FLOOR = \NumberFormatter::ROUND_FLOOR; - const ROUND_DOWN = \NumberFormatter::ROUND_DOWN; + const ROUND_FLOOR = \NumberFormatter::ROUND_FLOOR; + const ROUND_DOWN = \NumberFormatter::ROUND_DOWN; const ROUND_HALFDOWN = \NumberFormatter::ROUND_HALFDOWN; const ROUND_HALFEVEN = \NumberFormatter::ROUND_HALFEVEN; - const ROUND_HALFUP = \NumberFormatter::ROUND_HALFUP; - const ROUND_UP = \NumberFormatter::ROUND_UP; - const ROUND_CEILING = \NumberFormatter::ROUND_CEILING; + const ROUND_HALFUP = \NumberFormatter::ROUND_HALFUP; + const ROUND_UP = \NumberFormatter::ROUND_UP; + const ROUND_CEILING = \NumberFormatter::ROUND_CEILING; protected $precision; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php b/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php index a6f8c430e1..66f3641f43 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php @@ -81,24 +81,24 @@ abstract class BaseType extends AbstractType } $view->vars = array_replace($view->vars, array( - 'form' => $view, - 'id' => $id, - 'name' => $name, - 'full_name' => $fullName, - 'disabled' => $form->isDisabled(), - 'label' => $options['label'], - 'multipart' => false, - 'attr' => $options['attr'], - 'block_prefixes' => $blockPrefixes, + 'form' => $view, + 'id' => $id, + 'name' => $name, + 'full_name' => $fullName, + 'disabled' => $form->isDisabled(), + 'label' => $options['label'], + 'multipart' => false, + 'attr' => $options['attr'], + 'block_prefixes' => $blockPrefixes, 'unique_block_prefix' => $uniqueBlockPrefix, - 'translation_domain' => $translationDomain, + 'translation_domain' => $translationDomain, // Using the block name here speeds up performance in collection // forms, where each entry has the same full block name. // Including the type is important too, because if rows of a // collection form have different types (dynamically), they should // be rendered differently. // https://github.com/symfony/symfony/issues/5038 - 'cache_key' => $uniqueBlockPrefix.'_'.$form->getConfig()->getType()->getName(), + 'cache_key' => $uniqueBlockPrefix.'_'.$form->getConfig()->getType()->getName(), )); } @@ -108,16 +108,16 @@ abstract class BaseType extends AbstractType public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( - 'block_name' => null, - 'disabled' => false, - 'label' => null, - 'attr' => array(), + 'block_name' => null, + 'disabled' => false, + 'label' => null, + 'attr' => array(), 'translation_domain' => null, - 'auto_initialize' => true, + 'auto_initialize' => true, )); $resolver->setAllowedTypes(array( - 'attr' => 'array', + 'attr' => 'array', )); } } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php b/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php index 3952bb3316..13c78041d0 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php @@ -41,7 +41,7 @@ class CheckboxType extends AbstractType public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars = array_replace($view->vars, array( - 'value' => $options['value'], + 'value' => $options['value'], 'checked' => null !== $form->getViewData(), )); } @@ -56,9 +56,9 @@ class CheckboxType extends AbstractType }; $resolver->setDefaults(array( - 'value' => '1', + 'value' => '1', 'empty_data' => $emptyData, - 'compound' => false, + 'compound' => false, )); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php index 08504dea2b..529903e7dc 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php @@ -96,12 +96,12 @@ class ChoiceType extends AbstractType public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars = array_replace($view->vars, array( - 'multiple' => $options['multiple'], - 'expanded' => $options['expanded'], + 'multiple' => $options['multiple'], + 'expanded' => $options['expanded'], 'preferred_choices' => $options['choice_list']->getPreferredViews(), - 'choices' => $options['choice_list']->getRemainingViews(), - 'separator' => '-------------------', - 'empty_value' => null, + 'choices' => $options['choice_list']->getRemainingViews(), + 'separator' => '-------------------', + 'empty_value' => null, )); // The decision, whether a choice is selected, is potentially done @@ -208,19 +208,19 @@ class ChoiceType extends AbstractType }; $resolver->setDefaults(array( - 'multiple' => false, - 'expanded' => false, - 'choice_list' => $choiceList, - 'choices' => array(), + 'multiple' => false, + 'expanded' => false, + 'choice_list' => $choiceList, + 'choices' => array(), 'preferred_choices' => array(), - 'empty_data' => $emptyData, - 'empty_value' => $emptyValue, - 'error_bubbling' => false, - 'compound' => $compound, + 'empty_data' => $emptyData, + 'empty_value' => $emptyValue, + 'error_bubbling' => false, + 'compound' => $compound, // The view data is always a string, even if the "data" option // is manually set to an object. // See https://github.com/symfony/symfony/pull/5582 - 'data_class' => null, + 'data_class' => null, )); $resolver->setNormalizers(array( diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php b/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php index 0cb3af1bb7..0688bb19df 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php @@ -49,7 +49,7 @@ class CollectionType extends AbstractType public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars = array_replace($view->vars, array( - 'allow_add' => $options['allow_add'], + 'allow_add' => $options['allow_add'], 'allow_delete' => $options['allow_delete'], )); @@ -80,12 +80,12 @@ class CollectionType extends AbstractType }; $resolver->setDefaults(array( - 'allow_add' => false, - 'allow_delete' => false, - 'prototype' => true, + 'allow_add' => false, + 'allow_delete' => false, + 'prototype' => true, 'prototype_name' => '__name__', - 'type' => 'text', - 'options' => array(), + 'type' => 'text', + 'options' => array(), )); $resolver->setNormalizers(array( diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php index e8c4e748de..9f2927d978 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php @@ -212,26 +212,26 @@ class DateTimeType extends AbstractType }; $resolver->setDefaults(array( - 'input' => 'datetime', + 'input' => 'datetime', 'model_timezone' => null, - 'view_timezone' => null, - 'format' => self::HTML5_FORMAT, - 'date_format' => null, - 'widget' => null, - 'date_widget' => $dateWidget, - 'time_widget' => $timeWidget, - 'with_minutes' => true, - 'with_seconds' => false, + 'view_timezone' => null, + 'format' => self::HTML5_FORMAT, + 'date_format' => null, + 'widget' => null, + 'date_widget' => $dateWidget, + 'time_widget' => $timeWidget, + 'with_minutes' => true, + 'with_seconds' => false, // Don't modify \DateTime classes by reference, we treat // them like immutable value objects - 'by_reference' => false, + 'by_reference' => false, 'error_bubbling' => false, // If initialized with a \DateTime object, FormType initializes // this option to "\DateTime". Since the internal, normalized // representation is not \DateTime, but an array, we need to unset // this option. - 'data_class' => null, - 'compound' => $compound, + 'data_class' => null, + 'compound' => $compound, )); // Don't add some defaults in order to preserve the defaults @@ -247,7 +247,7 @@ class DateTimeType extends AbstractType )); $resolver->setAllowedValues(array( - 'input' => array( + 'input' => array( 'datetime', 'string', 'timestamp', @@ -266,7 +266,7 @@ class DateTimeType extends AbstractType 'choice', ), // This option will overwrite "date_widget" and "time_widget" options - 'widget' => array( + 'widget' => array( null, // default, don't overwrite options 'single_text', 'text', diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php index bcbf42dc5d..a7fc6cadf5 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php @@ -196,25 +196,25 @@ class DateType extends AbstractType }; $resolver->setDefaults(array( - 'years' => range(date('Y') - 5, date('Y') + 5), - 'months' => range(1, 12), - 'days' => range(1, 31), - 'widget' => 'choice', - 'input' => 'datetime', - 'format' => $format, + 'years' => range(date('Y') - 5, date('Y') + 5), + 'months' => range(1, 12), + 'days' => range(1, 31), + 'widget' => 'choice', + 'input' => 'datetime', + 'format' => $format, 'model_timezone' => null, - 'view_timezone' => null, - 'empty_value' => $emptyValue, + 'view_timezone' => null, + 'empty_value' => $emptyValue, // Don't modify \DateTime classes by reference, we treat // them like immutable value objects - 'by_reference' => false, + 'by_reference' => false, 'error_bubbling' => false, // If initialized with a \DateTime object, FormType initializes // this option to "\DateTime". Since the internal, normalized // representation is not \DateTime, but an array, we need to unset // this option. - 'data_class' => null, - 'compound' => $compound, + 'data_class' => null, + 'compound' => $compound, )); $resolver->setNormalizers(array( @@ -222,13 +222,13 @@ class DateType extends AbstractType )); $resolver->setAllowedValues(array( - 'input' => array( + 'input' => array( 'datetime', 'string', 'timestamp', 'array', ), - 'widget' => array( + 'widget' => array( 'single_text', 'text', 'choice', @@ -237,9 +237,9 @@ class DateType extends AbstractType $resolver->setAllowedTypes(array( 'format' => array('int', 'string'), - 'years' => 'array', + 'years' => 'array', 'months' => 'array', - 'days' => 'array', + 'days' => 'array', )); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/FileType.php b/src/Symfony/Component/Form/Extension/Core/Type/FileType.php index 2c09da6f6b..dd5e0dfe30 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/FileType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/FileType.php @@ -24,7 +24,7 @@ class FileType extends AbstractType public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars = array_replace($view->vars, array( - 'type' => 'file', + 'type' => 'file', 'value' => '', )); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php index b417afdbcb..3fb360aefb 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php @@ -85,19 +85,19 @@ class FormType extends BaseType } $view->vars = array_replace($view->vars, array( - 'read_only' => $readOnly, - 'errors' => $form->getErrors(), - 'valid' => $form->isSubmitted() ? $form->isValid() : true, - 'value' => $form->getViewData(), - 'data' => $form->getNormData(), - 'required' => $form->isRequired(), + 'read_only' => $readOnly, + 'errors' => $form->getErrors(), + 'valid' => $form->isSubmitted() ? $form->isValid() : true, + 'value' => $form->getViewData(), + 'data' => $form->getNormData(), + 'required' => $form->isRequired(), 'max_length' => $options['max_length'], - 'pattern' => $options['pattern'], - 'size' => null, + 'pattern' => $options['pattern'], + 'size' => null, 'label_attr' => $options['label_attr'], - 'compound' => $form->getConfig()->getCompound(), - 'method' => $form->getConfig()->getMethod(), - 'action' => $form->getConfig()->getAction(), + 'compound' => $form->getConfig()->getCompound(), + 'method' => $form->getConfig()->getMethod(), + 'action' => $form->getConfig()->getAction(), )); } @@ -169,25 +169,25 @@ class FormType extends BaseType )); $resolver->setDefaults(array( - 'data_class' => $dataClass, - 'empty_data' => $emptyData, - 'trim' => true, - 'required' => true, - 'read_only' => false, - 'max_length' => null, - 'pattern' => null, - 'property_path' => null, - 'mapped' => true, - 'by_reference' => true, - 'error_bubbling' => $errorBubbling, - 'label_attr' => array(), - 'virtual' => null, - 'inherit_data' => $inheritData, - 'compound' => true, - 'method' => 'POST', + 'data_class' => $dataClass, + 'empty_data' => $emptyData, + 'trim' => true, + 'required' => true, + 'read_only' => false, + 'max_length' => null, + 'pattern' => null, + 'property_path' => null, + 'mapped' => true, + 'by_reference' => true, + 'error_bubbling' => $errorBubbling, + 'label_attr' => array(), + 'virtual' => null, + 'inherit_data' => $inheritData, + 'compound' => true, + 'method' => 'POST', // According to RFC 2396 (http://www.ietf.org/rfc/rfc2396.txt) // section 4.2., empty URIs are considered same-document references - 'action' => '', + 'action' => '', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', )); diff --git a/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php b/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php index bd4fa898e6..352b34620c 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php @@ -23,10 +23,10 @@ class HiddenType extends AbstractType { $resolver->setDefaults(array( // hidden fields cannot have a required attribute - 'required' => false, + 'required' => false, // Pass errors to the parent 'error_bubbling' => true, - 'compound' => false, + 'compound' => false, )); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php b/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php index b224cac5fd..557b458838 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php @@ -38,11 +38,11 @@ class IntegerType extends AbstractType { $resolver->setDefaults(array( // default precision is locale specific (usually around 3) - 'precision' => null, - 'grouping' => false, + 'precision' => null, + 'grouping' => false, // Integer cast rounds towards 0, so do the same when displaying fractions 'rounding_mode' => \NumberFormatter::ROUND_DOWN, - 'compound' => false, + 'compound' => false, )); $resolver->setAllowedValues(array( diff --git a/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php b/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php index 9e36f9ce16..787557c4b9 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php @@ -52,10 +52,10 @@ class MoneyType extends AbstractType { $resolver->setDefaults(array( 'precision' => 2, - 'grouping' => false, - 'divisor' => 1, - 'currency' => 'EUR', - 'compound' => false, + 'grouping' => false, + 'divisor' => 1, + 'currency' => 'EUR', + 'compound' => false, )); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php b/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php index beb3c89a41..2e4ba7a335 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php @@ -37,10 +37,10 @@ class NumberType extends AbstractType { $resolver->setDefaults(array( // default precision is locale specific (usually around 3) - 'precision' => null, - 'grouping' => false, + 'precision' => null, + 'grouping' => false, 'rounding_mode' => \NumberFormatter::ROUND_HALFUP, - 'compound' => false, + 'compound' => false, )); $resolver->setAllowedValues(array( diff --git a/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php b/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php index 5a5b1635d1..8f5633c6d1 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php @@ -35,7 +35,7 @@ class PasswordType extends AbstractType { $resolver->setDefaults(array( 'always_empty' => true, - 'trim' => false, + 'trim' => false, )); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php b/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php index b1df94364d..079eca0497 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php @@ -33,8 +33,8 @@ class PercentType extends AbstractType { $resolver->setDefaults(array( 'precision' => 0, - 'type' => 'fractional', - 'compound' => false, + 'type' => 'fractional', + 'compound' => false, )); $resolver->setAllowedValues(array( diff --git a/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php b/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php index 67422e38f4..47a3299359 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php @@ -24,7 +24,7 @@ class RepeatedType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { // Overwrite required option for child fields - $options['first_options']['required'] = $options['required']; + $options['first_options']['required'] = $options['required']; $options['second_options']['required'] = $options['required']; if (!isset($options['options']['error_bubbling'])) { @@ -47,18 +47,18 @@ class RepeatedType extends AbstractType public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( - 'type' => 'text', - 'options' => array(), - 'first_options' => array(), + 'type' => 'text', + 'options' => array(), + 'first_options' => array(), 'second_options' => array(), - 'first_name' => 'first', - 'second_name' => 'second', + 'first_name' => 'first', + 'second_name' => 'second', 'error_bubbling' => false, )); $resolver->setAllowedTypes(array( - 'options' => 'array', - 'first_options' => 'array', + 'options' => 'array', + 'first_options' => 'array', 'second_options' => 'array', )); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php index eee118a030..fc6362c24c 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php @@ -30,7 +30,7 @@ class TimeType extends AbstractType */ public function buildForm(FormBuilderInterface $builder, array $options) { - $parts = array('hour'); + $parts = array('hour'); $format = 'H'; if ($options['with_seconds'] && !$options['with_minutes']) { @@ -133,7 +133,7 @@ class TimeType extends AbstractType public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars = array_replace($view->vars, array( - 'widget' => $options['widget'], + 'widget' => $options['widget'], 'with_minutes' => $options['with_minutes'], 'with_seconds' => $options['with_seconds'], )); @@ -182,26 +182,26 @@ class TimeType extends AbstractType }; $resolver->setDefaults(array( - 'hours' => range(0, 23), - 'minutes' => range(0, 59), - 'seconds' => range(0, 59), - 'widget' => 'choice', - 'input' => 'datetime', - 'with_minutes' => true, - 'with_seconds' => false, + 'hours' => range(0, 23), + 'minutes' => range(0, 59), + 'seconds' => range(0, 59), + 'widget' => 'choice', + 'input' => 'datetime', + 'with_minutes' => true, + 'with_seconds' => false, 'model_timezone' => null, - 'view_timezone' => null, - 'empty_value' => $emptyValue, + 'view_timezone' => null, + 'empty_value' => $emptyValue, // Don't modify \DateTime classes by reference, we treat // them like immutable value objects - 'by_reference' => false, + 'by_reference' => false, 'error_bubbling' => false, // If initialized with a \DateTime object, FormType initializes // this option to "\DateTime". Since the internal, normalized // representation is not \DateTime, but an array, we need to unset // this option. - 'data_class' => null, - 'compound' => $compound, + 'data_class' => null, + 'compound' => $compound, )); $resolver->setNormalizers(array( @@ -223,7 +223,7 @@ class TimeType extends AbstractType )); $resolver->setAllowedTypes(array( - 'hours' => 'array', + 'hours' => 'array', 'minutes' => 'array', 'seconds' => 'array', )); diff --git a/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php b/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php index 845e18b2a2..e4ef174461 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php +++ b/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php @@ -112,11 +112,11 @@ class FormTypeCsrfExtension extends AbstractTypeExtension public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( - 'csrf_protection' => $this->defaultEnabled, - 'csrf_field_name' => $this->defaultFieldName, - 'csrf_provider' => $this->defaultCsrfProvider, - 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', - 'intention' => null, + 'csrf_protection' => $this->defaultEnabled, + 'csrf_field_name' => $this->defaultFieldName, + 'csrf_provider' => $this->defaultCsrfProvider, + 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', + 'intention' => null, )); } diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php index ae39af66fc..4f9234920c 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php +++ b/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php @@ -60,16 +60,16 @@ class FormTypeValidatorExtension extends BaseValidatorExtension }; $resolver->setDefaults(array( - 'error_mapping' => array(), - 'constraints' => array(), - 'cascade_validation' => false, - 'invalid_message' => 'This value is not valid.', + 'error_mapping' => array(), + 'constraints' => array(), + 'cascade_validation' => false, + 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), - 'extra_fields_message' => 'This form should not contain extra fields.', + 'extra_fields_message' => 'This form should not contain extra fields.', )); $resolver->setNormalizers(array( - 'constraints' => $constraintsNormalizer, + 'constraints' => $constraintsNormalizer, )); } diff --git a/src/Symfony/Component/Form/FormBuilder.php b/src/Symfony/Component/Form/FormBuilder.php index 1c56df2a71..9511187e3b 100644 --- a/src/Symfony/Component/Form/FormBuilder.php +++ b/src/Symfony/Component/Form/FormBuilder.php @@ -82,7 +82,7 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB // Add to "children" to maintain order $this->children[$child] = null; $this->unresolvedChildren[$child] = array( - 'type' => $type, + 'type' => $type, 'options' => $options, ); diff --git a/src/Symfony/Component/Form/FormFactory.php b/src/Symfony/Component/Form/FormFactory.php index a5fd9cc0c6..4a2b6d634a 100644 --- a/src/Symfony/Component/Form/FormFactory.php +++ b/src/Symfony/Component/Form/FormFactory.php @@ -104,7 +104,7 @@ class FormFactory implements FormFactoryInterface $type = $typeGuess ? $typeGuess->getType() : 'text'; $maxLength = $maxLengthGuess ? $maxLengthGuess->getValue() : null; - $pattern = $patternGuess ? $patternGuess->getValue() : null; + $pattern = $patternGuess ? $patternGuess->getValue() : null; if (null !== $pattern) { $options = array_merge(array('pattern' => $pattern), $options); diff --git a/src/Symfony/Component/Form/FormView.php b/src/Symfony/Component/Form/FormView.php index c2c3679f0b..f8e81ffbc2 100644 --- a/src/Symfony/Component/Form/FormView.php +++ b/src/Symfony/Component/Form/FormView.php @@ -24,7 +24,7 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable */ public $vars = array( 'value' => null, - 'attr' => array(), + 'attr' => array(), ); /** diff --git a/src/Symfony/Component/Form/NativeRequestHandler.php b/src/Symfony/Component/Form/NativeRequestHandler.php index 9df9066886..bc91b02756 100644 --- a/src/Symfony/Component/Form/NativeRequestHandler.php +++ b/src/Symfony/Component/Form/NativeRequestHandler.php @@ -184,11 +184,11 @@ class NativeRequestHandler implements RequestHandlerInterface foreach (array_keys($data['name']) as $key) { $files[$key] = self::fixPhpFilesArray(array( - 'error' => $data['error'][$key], - 'name' => $data['name'][$key], - 'type' => $data['type'][$key], + 'error' => $data['error'][$key], + 'name' => $data['name'][$key], + 'type' => $data['type'][$key], 'tmp_name' => $data['tmp_name'][$key], - 'size' => $data['size'][$key], + 'size' => $data['size'][$key], )); } diff --git a/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php index 21ea55833a..075d6fee15 100644 --- a/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php @@ -524,7 +524,7 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest { $form = $this->factory->createNamed('name', 'repeated', null, array( // the global required value cannot be overridden - 'first_options' => array('label' => 'Test', 'required' => false), + 'first_options' => array('label' => 'Test', 'required' => false), 'second_options' => array('label' => 'Test2'), )); diff --git a/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php index 25fa504a53..013e13c472 100644 --- a/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php @@ -399,8 +399,8 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest public function testRepeatedWithCustomOptions() { $form = $this->factory->createNamed('name', 'repeated', 'foobar', array( - 'type' => 'password', - 'first_options' => array('label' => 'Test', 'required' => false), + 'type' => 'password', + 'first_options' => array('label' => 'Test', 'required' => false), 'second_options' => array('label' => 'Test2'), )); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php index 606f6a2b05..c753798432 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php @@ -65,7 +65,7 @@ class TrimListenerTest extends \PHPUnit_Framework_TestCase $symbol = mb_convert_encoding($binary, 'UTF-8', 'UCS-2BE'); $symbol = $symbol."ab\ncd".$symbol; - $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); + $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $event = new FormEvent($form, $symbol); $filter = new TrimListener(); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php index 0f100f24ea..895661ee4f 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php @@ -94,8 +94,8 @@ class ChoiceTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testExpandedChoicesOptionsTurnIntoChildren() { $form = $this->factory->create('choice', null, array( - 'expanded' => true, - 'choices' => $this->choices, + 'expanded' => true, + 'choices' => $this->choices, )); $this->assertCount(count($this->choices), $form, 'Each choice should become a new field'); @@ -104,10 +104,10 @@ class ChoiceTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testPlaceholderPresentOnNonRequiredExpandedSingleChoice() { $form = $this->factory->create('choice', null, array( - 'multiple' => false, - 'expanded' => true, - 'required' => false, - 'choices' => $this->choices, + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => $this->choices, )); $this->assertTrue(isset($form['placeholder'])); @@ -117,10 +117,10 @@ class ChoiceTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testPlaceholderNotPresentIfRequired() { $form = $this->factory->create('choice', null, array( - 'multiple' => false, - 'expanded' => true, - 'required' => true, - 'choices' => $this->choices, + 'multiple' => false, + 'expanded' => true, + 'required' => true, + 'choices' => $this->choices, )); $this->assertFalse(isset($form['placeholder'])); @@ -130,10 +130,10 @@ class ChoiceTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testPlaceholderNotPresentIfMultiple() { $form = $this->factory->create('choice', null, array( - 'multiple' => true, - 'expanded' => true, - 'required' => false, - 'choices' => $this->choices, + 'multiple' => true, + 'expanded' => true, + 'required' => false, + 'choices' => $this->choices, )); $this->assertFalse(isset($form['placeholder'])); @@ -143,9 +143,9 @@ class ChoiceTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testPlaceholderNotPresentIfEmptyChoice() { $form = $this->factory->create('choice', null, array( - 'multiple' => false, - 'expanded' => true, - 'required' => false, + 'multiple' => false, + 'expanded' => true, + 'required' => false, 'choices' => array( '' => 'Empty', 1 => 'Not empty', @@ -159,8 +159,8 @@ class ChoiceTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testExpandedChoicesOptionsAreFlattened() { $form = $this->factory->create('choice', null, array( - 'expanded' => true, - 'choices' => $this->groupedChoices, + 'expanded' => true, + 'choices' => $this->groupedChoices, )); $flattened = array(); 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 be3ad9db5c..3dee683ddd 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php @@ -120,7 +120,7 @@ class CollectionTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testAllowAddButNoPrototype() { $form = $this->factory->create('collection', null, array( - 'type' => 'form', + 'type' => 'form', 'allow_add' => true, 'prototype' => false, )); @@ -132,7 +132,7 @@ class CollectionTypeTest extends \Symfony\Component\Form\Test\TypeTestCase { $form = $this->factory ->create('collection', null, array( - 'type' => 'file', + 'type' => 'file', 'allow_add' => true, 'prototype' => true, )) @@ -144,7 +144,7 @@ class CollectionTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testGetDataDoesNotContainsPrototypeNameBeforeDataAreSet() { $form = $this->factory->create('collection', array(), array( - 'type' => 'file', + 'type' => 'file', 'prototype' => true, 'allow_add' => true, )); @@ -156,7 +156,7 @@ class CollectionTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testGetDataDoesNotContainsPrototypeNameAfterDataAreSet() { $form = $this->factory->create('collection', array(), array( - 'type' => 'file', + 'type' => 'file', 'allow_add' => true, 'prototype' => true, )); @@ -169,7 +169,7 @@ class CollectionTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testPrototypeNameOption() { $form = $this->factory->create('collection', null, array( - 'type' => 'form', + 'type' => 'form', 'prototype' => true, 'allow_add' => true, )); @@ -177,9 +177,9 @@ class CollectionTypeTest extends \Symfony\Component\Form\Test\TypeTestCase $this->assertSame('__name__', $form->getConfig()->getAttribute('prototype')->getName(), '__name__ is the default'); $form = $this->factory->create('collection', null, array( - 'type' => 'form', - 'prototype' => true, - 'allow_add' => true, + 'type' => 'form', + 'prototype' => true, + 'allow_add' => true, 'prototype_name' => '__test__', )); @@ -189,7 +189,7 @@ class CollectionTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testPrototypeDefaultLabel() { $form = $this->factory->create('collection', array(), array( - 'type' => 'file', + 'type' => 'file', 'allow_add' => true, 'prototype' => true, 'prototype_name' => '__test__', diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php index 5db909ff21..8e56b8feb9 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php @@ -36,7 +36,7 @@ class RepeatedTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testSetOptions() { $form = $this->factory->create('repeated', null, array( - 'type' => 'text', + 'type' => 'text', 'options' => array('label' => 'Global'), )); @@ -50,8 +50,8 @@ class RepeatedTypeTest extends \Symfony\Component\Form\Test\TypeTestCase { $form = $this->factory->create('repeated', null, array( // the global required value cannot be overridden - 'type' => 'text', - 'first_options' => array('label' => 'Test', 'required' => false), + 'type' => 'text', + 'first_options' => array('label' => 'Test', 'required' => false), 'second_options' => array('label' => 'Test2'), )); @@ -65,7 +65,7 @@ class RepeatedTypeTest extends \Symfony\Component\Form\Test\TypeTestCase { $form = $this->factory->create('repeated', null, array( 'required' => false, - 'type' => 'text', + 'type' => 'text', )); $this->assertFalse($form['first']->isRequired()); @@ -78,7 +78,7 @@ class RepeatedTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testSetInvalidOptions() { $this->factory->create('repeated', null, array( - 'type' => 'text', + 'type' => 'text', 'options' => 'bad value', )); } @@ -89,7 +89,7 @@ class RepeatedTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testSetInvalidFirstOptions() { $this->factory->create('repeated', null, array( - 'type' => 'text', + 'type' => 'text', 'first_options' => 'bad value', )); } @@ -100,7 +100,7 @@ class RepeatedTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testSetInvalidSecondOptions() { $this->factory->create('repeated', null, array( - 'type' => 'text', + 'type' => 'text', 'second_options' => 'bad value', )); } @@ -143,8 +143,8 @@ class RepeatedTypeTest extends \Symfony\Component\Form\Test\TypeTestCase public function testSetOptionsPerChildAndOverwrite() { $form = $this->factory->create('repeated', null, array( - 'type' => 'text', - 'options' => array('label' => 'Label'), + 'type' => 'text', + 'options' => array('label' => 'Label'), 'second_options' => array('label' => 'Second label'), )); diff --git a/src/Symfony/Component/HttpFoundation/File/UploadedFile.php b/src/Symfony/Component/HttpFoundation/File/UploadedFile.php index d729546875..aabe73f1f1 100644 --- a/src/Symfony/Component/HttpFoundation/File/UploadedFile.php +++ b/src/Symfony/Component/HttpFoundation/File/UploadedFile.php @@ -293,13 +293,13 @@ class UploadedFile extends File private function getErrorMessage($errorCode) { static $errors = array( - UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d kb).', - UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.', - UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.', - UPLOAD_ERR_NO_FILE => 'No file was uploaded.', + UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d kb).', + UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.', + UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.', + UPLOAD_ERR_NO_FILE => 'No file was uploaded.', UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.', UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.', - UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.', + UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.', ); $maxFilesize = $errorCode === UPLOAD_ERR_INI_SIZE ? self::getMaxFilesize() / 1024 : 0; diff --git a/src/Symfony/Component/HttpFoundation/FileBag.php b/src/Symfony/Component/HttpFoundation/FileBag.php index 699e408d02..467c31576b 100644 --- a/src/Symfony/Component/HttpFoundation/FileBag.php +++ b/src/Symfony/Component/HttpFoundation/FileBag.php @@ -142,11 +142,11 @@ class FileBag extends ParameterBag foreach (array_keys($data['name']) as $key) { $files[$key] = $this->fixPhpFilesArray(array( - 'error' => $data['error'][$key], - 'name' => $data['name'][$key], - 'type' => $data['type'][$key], + 'error' => $data['error'][$key], + 'name' => $data['name'][$key], + 'type' => $data['type'][$key], 'tmp_name' => $data['tmp_name'][$key], - 'size' => $data['size'][$key], + 'size' => $data['size'][$key], )); } diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 9fd02cc2d1..2ba076ec22 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -30,10 +30,10 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface; */ class Request { - const HEADER_CLIENT_IP = 'client_ip'; - const HEADER_CLIENT_HOST = 'client_host'; + const HEADER_CLIENT_IP = 'client_ip'; + const HEADER_CLIENT_HOST = 'client_host'; const HEADER_CLIENT_PROTO = 'client_proto'; - const HEADER_CLIENT_PORT = 'client_port'; + const HEADER_CLIENT_PORT = 'client_port'; protected static $trustedProxies = array(); @@ -55,10 +55,10 @@ class Request * by popular reverse proxies (like Apache mod_proxy or Amazon EC2). */ protected static $trustedHeaders = array( - self::HEADER_CLIENT_IP => 'X_FORWARDED_FOR', - self::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST', + self::HEADER_CLIENT_IP => 'X_FORWARDED_FOR', + self::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST', self::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO', - self::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT', + self::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT', ); protected static $httpMethodParameterOverride = false; @@ -293,18 +293,18 @@ class Request public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null) { $server = array_replace(array( - 'SERVER_NAME' => 'localhost', - 'SERVER_PORT' => 80, - 'HTTP_HOST' => 'localhost', - 'HTTP_USER_AGENT' => 'Symfony/2.X', - 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + 'SERVER_NAME' => 'localhost', + 'SERVER_PORT' => 80, + 'HTTP_HOST' => 'localhost', + 'HTTP_USER_AGENT' => 'Symfony/2.X', + 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5', - 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', - 'REMOTE_ADDR' => '127.0.0.1', - 'SCRIPT_NAME' => '', - 'SCRIPT_FILENAME' => '', - 'SERVER_PROTOCOL' => 'HTTP/1.1', - 'REQUEST_TIME' => time(), + 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', + 'REMOTE_ADDR' => '127.0.0.1', + 'SCRIPT_NAME' => '', + 'SCRIPT_FILENAME' => '', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + 'REQUEST_TIME' => time(), ), $server); $server['PATH_INFO'] = ''; @@ -447,13 +447,13 @@ class Request */ public function __clone() { - $this->query = clone $this->query; - $this->request = clone $this->request; + $this->query = clone $this->query; + $this->request = clone $this->request; $this->attributes = clone $this->attributes; - $this->cookies = clone $this->cookies; - $this->files = clone $this->files; - $this->server = clone $this->server; - $this->headers = clone $this->headers; + $this->cookies = clone $this->cookies; + $this->files = clone $this->files; + $this->server = clone $this->server; + $this->headers = clone $this->headers; } /** @@ -1000,7 +1000,7 @@ class Request public function getHttpHost() { $scheme = $this->getScheme(); - $port = $this->getPort(); + $port = $this->getPort(); if (('http' == $scheme && $port == 80) || ('https' == $scheme && $port == 443)) { return $this->getHost(); @@ -1656,15 +1656,15 @@ class Request } else { // Backtrack up the script_filename to find the portion matching // php_self - $path = $this->server->get('PHP_SELF', ''); - $file = $this->server->get('SCRIPT_FILENAME', ''); - $segs = explode('/', trim($file, '/')); - $segs = array_reverse($segs); - $index = 0; - $last = count($segs); + $path = $this->server->get('PHP_SELF', ''); + $file = $this->server->get('SCRIPT_FILENAME', ''); + $segs = explode('/', trim($file, '/')); + $segs = array_reverse($segs); + $index = 0; + $last = count($segs); $baseUrl = ''; do { - $seg = $segs[$index]; + $seg = $segs[$index]; $baseUrl = '/'.$seg.$baseUrl; ++$index; } while ($last > $index && (false !== $pos = strpos($path, $baseUrl)) && 0 != $pos); @@ -1767,14 +1767,14 @@ class Request { static::$formats = array( 'html' => array('text/html', 'application/xhtml+xml'), - 'txt' => array('text/plain'), - 'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'), - 'css' => array('text/css'), + 'txt' => array('text/plain'), + 'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'), + 'css' => array('text/css'), 'json' => array('application/json', 'application/x-json'), - 'xml' => array('text/xml', 'application/xml', 'application/x-xml'), - 'rdf' => array('application/rdf+xml'), + 'xml' => array('text/xml', 'application/xml', 'application/x-xml'), + 'rdf' => array('application/rdf+xml'), 'atom' => array('application/atom+xml'), - 'rss' => array('application/rss+xml'), + 'rss' => array('application/rss+xml'), ); } diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index cffe28f07e..0e5d07184e 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -1033,8 +1033,8 @@ class Response return false; } - $notModified = false; - $lastModified = $this->headers->get('Last-Modified'); + $notModified = false; + $lastModified = $this->headers->get('Last-Modified'); $modifiedSince = $request->headers->get('If-Modified-Since'); if ($etags = $request->getEtags()) { diff --git a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php index f52f048875..cd51a40f9b 100644 --- a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php +++ b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php @@ -20,11 +20,11 @@ namespace Symfony\Component\HttpFoundation; */ class ResponseHeaderBag extends HeaderBag { - const COOKIES_FLAT = 'flat'; - const COOKIES_ARRAY = 'array'; + const COOKIES_FLAT = 'flat'; + const COOKIES_ARRAY = 'array'; const DISPOSITION_ATTACHMENT = 'attachment'; - const DISPOSITION_INLINE = 'inline'; + const DISPOSITION_INLINE = 'inline'; /** * @var array @@ -34,12 +34,12 @@ class ResponseHeaderBag extends HeaderBag /** * @var array */ - protected $cookies = array(); + protected $cookies = array(); /** * @var array */ - protected $headerNames = array(); + protected $headerNames = array(); /** * Constructor. diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php index ca7920cfdb..0d7442cda7 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -62,7 +62,7 @@ class MongoDbSessionHandler implements \SessionHandlerInterface $this->mongo = $mongo; $this->options = array_merge(array( - 'id_field' => '_id', + 'id_field' => '_id', 'data_field' => 'data', 'time_field' => 'time', ), $options); diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 569e08958b..f1b7a058e0 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -75,7 +75,7 @@ class PdoSessionHandler implements \SessionHandlerInterface } $this->pdo = $pdo; $dbOptions = array_merge(array( - 'db_id_col' => 'sess_id', + 'db_id_col' => 'sess_id', 'db_data_col' => 'sess_data', 'db_time_col' => 'sess_time', ), $dbOptions); diff --git a/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php index d9f9a32330..6845118cc2 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php @@ -35,7 +35,7 @@ class ApacheRequestTest extends \PHPUnit_Framework_TestCase array( 'REQUEST_URI' => '/foo/app_dev.php/bar', 'SCRIPT_NAME' => '/foo/app_dev.php', - 'PATH_INFO' => '/bar', + 'PATH_INFO' => '/bar', ), '/foo/app_dev.php/bar', '/foo/app_dev.php', @@ -54,7 +54,7 @@ class ApacheRequestTest extends \PHPUnit_Framework_TestCase array( 'REQUEST_URI' => '/app_dev.php/foo/bar', 'SCRIPT_NAME' => '/app_dev.php', - 'PATH_INFO' => '/foo/bar', + 'PATH_INFO' => '/foo/bar', ), '/app_dev.php/foo/bar', '/app_dev.php', diff --git a/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php index b1bfefbf87..f1a0ef2c9b 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php @@ -191,7 +191,7 @@ class HeaderBagTest extends \PHPUnit_Framework_TestCase */ public function testGetIterator() { - $headers = array('foo' => 'bar', 'hello' => 'world', 'third' => 'charm'); + $headers = array('foo' => 'bar', 'hello' => 'world', 'third' => 'charm'); $headerBag = new HeaderBag($headers); $i = 0; @@ -208,7 +208,7 @@ class HeaderBagTest extends \PHPUnit_Framework_TestCase */ public function testCount() { - $headers = array('foo' => 'bar', 'HELLO' => 'WORLD'); + $headers = array('foo' => 'bar', 'HELLO' => 'WORLD'); $headerBag = new HeaderBag($headers); $this->assertEquals(count($headers), count($headerBag)); diff --git a/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php index 95af8a14d9..6bb5c108c1 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php @@ -211,12 +211,12 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals('http://example.com/foo', $bag->filter('url', '', false, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED), '->filter() gets a value of parameter as URL with a path'); $this->assertFalse($bag->filter('dec', '', false, FILTER_VALIDATE_INT, array( - 'flags' => FILTER_FLAG_ALLOW_HEX, + 'flags' => FILTER_FLAG_ALLOW_HEX, 'options' => array('min_range' => 1, 'max_range' => 0xff),) ), '->filter() gets a value of parameter as integer between boundaries'); $this->assertFalse($bag->filter('hex', '', false, FILTER_VALIDATE_INT, array( - 'flags' => FILTER_FLAG_ALLOW_HEX, + 'flags' => FILTER_FLAG_ALLOW_HEX, 'options' => array('min_range' => 1, 'max_range' => 0xff),) ), '->filter() gets a value of parameter as integer between boundaries'); diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index 6059969363..c145bf3e03 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -232,13 +232,13 @@ class RequestTest extends \PHPUnit_Framework_TestCase { // server is used by default $request = Request::create('/', 'DELETE', array(), array(), array(), array( - 'HTTP_HOST' => 'example.com', - 'HTTPS' => 'on', - 'SERVER_PORT' => 443, + 'HTTP_HOST' => 'example.com', + 'HTTPS' => 'on', + 'SERVER_PORT' => 443, 'PHP_AUTH_USER' => 'fabien', - 'PHP_AUTH_PW' => 'pa$$', - 'QUERY_STRING' => 'foo=bar', - 'CONTENT_TYPE' => 'application/json', + 'PHP_AUTH_PW' => 'pa$$', + 'QUERY_STRING' => 'foo=bar', + 'CONTENT_TYPE' => 'application/json', )); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(443, $request->getPort()); @@ -250,8 +250,8 @@ class RequestTest extends \PHPUnit_Framework_TestCase // URI has precedence over server $request = Request::create('http://thomas:pokemon@example.net:8080/?foo=bar', 'GET', array(), array(), array(), array( - 'HTTP_HOST' => 'example.com', - 'HTTPS' => 'on', + 'HTTP_HOST' => 'example.com', + 'HTTPS' => 'on', 'SERVER_PORT' => 443, )); $this->assertEquals('example.net', $request->getHost()); @@ -436,14 +436,14 @@ class RequestTest extends \PHPUnit_Framework_TestCase // With encoded characters $server = array( - 'HTTP_HOST' => 'host:8080', - 'SERVER_NAME' => 'servername', - 'SERVER_PORT' => '8080', - 'QUERY_STRING' => 'query=string', - 'REQUEST_URI' => '/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', - 'SCRIPT_NAME' => '/ba se/index_dev.php', + 'HTTP_HOST' => 'host:8080', + 'SERVER_NAME' => 'servername', + 'SERVER_PORT' => '8080', + 'QUERY_STRING' => 'query=string', + 'REQUEST_URI' => '/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', + 'SCRIPT_NAME' => '/ba se/index_dev.php', 'PATH_TRANSLATED' => 'redirect:/index.php/foo bar/in+fo', - 'PHP_SELF' => '/ba se/index_dev.php/path/info', + 'PHP_SELF' => '/ba se/index_dev.php/path/info', 'SCRIPT_FILENAME' => '/some/where/ba se/index_dev.php', ); @@ -705,7 +705,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase Request::setTrustedProxies(array('1.1.1.1')); $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( 'HTTP_X_FORWARDED_PROTO' => 'https', - 'HTTP_X_FORWARDED_PORT' => '8443', + 'HTTP_X_FORWARDED_PORT' => '8443', )); $port = $request->getPort(); @@ -943,10 +943,10 @@ class RequestTest extends \PHPUnit_Framework_TestCase { $normalizedMethod = strtoupper($method); - $_GET['foo1'] = 'bar1'; - $_POST['foo2'] = 'bar2'; + $_GET['foo1'] = 'bar1'; + $_POST['foo2'] = 'bar2'; $_COOKIE['foo3'] = 'bar3'; - $_FILES['foo4'] = array('bar4'); + $_FILES['foo4'] = array('bar4'); $_SERVER['foo5'] = 'bar5'; $request = Request::createFromGlobals(); @@ -968,8 +968,8 @@ class RequestTest extends \PHPUnit_Framework_TestCase Request::createFromGlobals(); Request::enableHttpMethodParameterOverride(); - $_POST['_method'] = $method; - $_POST['foo6'] = 'bar6'; + $_POST['_method'] = $method; + $_POST['foo6'] = 'bar6'; $_SERVER['REQUEST_METHOD'] = 'PoSt'; $request = Request::createFromGlobals(); $this->assertEquals($normalizedMethod, $request->getMethod()); @@ -1302,8 +1302,8 @@ class RequestTest extends \PHPUnit_Framework_TestCase '/foo%20bar', array( 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', - 'SCRIPT_NAME' => '/foo bar/app.php', - 'PHP_SELF' => '/foo bar/app.php', + 'SCRIPT_NAME' => '/foo bar/app.php', + 'PHP_SELF' => '/foo bar/app.php', ), '/foo%20bar', '/', @@ -1312,8 +1312,8 @@ class RequestTest extends \PHPUnit_Framework_TestCase '/foo%20bar/home', array( 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', - 'SCRIPT_NAME' => '/foo bar/app.php', - 'PHP_SELF' => '/foo bar/app.php', + 'SCRIPT_NAME' => '/foo bar/app.php', + 'PHP_SELF' => '/foo bar/app.php', ), '/foo%20bar', '/home', @@ -1322,8 +1322,8 @@ class RequestTest extends \PHPUnit_Framework_TestCase '/foo%20bar/app.php/home', array( 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', - 'SCRIPT_NAME' => '/foo bar/app.php', - 'PHP_SELF' => '/foo bar/app.php', + 'SCRIPT_NAME' => '/foo bar/app.php', + 'PHP_SELF' => '/foo bar/app.php', ), '/foo%20bar/app.php', '/home', @@ -1332,8 +1332,8 @@ class RequestTest extends \PHPUnit_Framework_TestCase '/foo%20bar/app.php/home%3Dbaz', array( 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', - 'SCRIPT_NAME' => '/foo bar/app.php', - 'PHP_SELF' => '/foo bar/app.php', + 'SCRIPT_NAME' => '/foo bar/app.php', + 'PHP_SELF' => '/foo bar/app.php', ), '/foo%20bar/app.php', '/home%3Dbaz', @@ -1342,8 +1342,8 @@ class RequestTest extends \PHPUnit_Framework_TestCase '/foo/bar+baz', array( 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo/app.php', - 'SCRIPT_NAME' => '/foo/app.php', - 'PHP_SELF' => '/foo/app.php', + 'SCRIPT_NAME' => '/foo/app.php', + 'PHP_SELF' => '/foo/app.php', ), '/foo', '/bar+baz', diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php index 35ca767795..a8a639082d 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php @@ -128,9 +128,9 @@ class ResponseTest extends ResponseTestCase public function testIsNotModifiedLastModified() { - $before = 'Sun, 25 Aug 2013 18:32:31 GMT'; + $before = 'Sun, 25 Aug 2013 18:32:31 GMT'; $modified = 'Sun, 25 Aug 2013 18:33:31 GMT'; - $after = 'Sun, 25 Aug 2013 19:33:31 GMT'; + $after = 'Sun, 25 Aug 2013 19:33:31 GMT'; $request = new Request(); $request->headers->set('If-Modified-Since', $modified); @@ -172,10 +172,10 @@ class ResponseTest extends ResponseTestCase public function testIsNotModifiedLastModifiedAndEtag() { - $before = 'Sun, 25 Aug 2013 18:32:31 GMT'; + $before = 'Sun, 25 Aug 2013 18:32:31 GMT'; $modified = 'Sun, 25 Aug 2013 18:33:31 GMT'; - $after = 'Sun, 25 Aug 2013 19:33:31 GMT'; - $etag = 'randomly_generated_etag'; + $after = 'Sun, 25 Aug 2013 19:33:31 GMT'; + $etag = 'randomly_generated_etag'; $request = new Request(); $request->headers->set('if_none_match', sprintf('%s, %s', $etag, 'etagThree')); @@ -199,7 +199,7 @@ class ResponseTest extends ResponseTestCase public function testIsNotModifiedIfModifiedSinceAndEtagWithoutLastModified() { $modified = 'Sun, 25 Aug 2013 18:33:31 GMT'; - $etag = 'randomly_generated_etag'; + $etag = 'randomly_generated_etag'; $request = new Request(); $request->headers->set('if_none_match', sprintf('%s, %s', $etag, 'etagThree')); @@ -777,18 +777,18 @@ class ResponseTest extends ResponseTestCase public function validContentProvider() { return array( - 'obj' => array(new StringableObject()), + 'obj' => array(new StringableObject()), 'string' => array('Foo'), - 'int' => array(2), + 'int' => array(2), ); } public function invalidContentProvider() { return array( - 'obj' => array(new \stdClass()), + 'obj' => array(new \stdClass()), 'array' => array(array()), - 'bool' => array(true, '1'), + 'bool' => array(true, '1'), ); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php index 927766440b..d5db694c05 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php @@ -37,7 +37,7 @@ class MongoDbSessionHandlerTest extends \PHPUnit_Framework_TestCase ->getMock(); $this->options = array( - 'id_field' => '_id', + 'id_field' => '_id', 'data_field' => 'data', 'time_field' => 'time', 'database' => 'sf2-test', diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index 8a35ebc70f..ae9f73c928 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -55,22 +55,22 @@ class ConfigDataCollector extends DataCollector public function collect(Request $request, Response $response, \Exception $exception = null) { $this->data = array( - 'app_name' => $this->name, - 'app_version' => $this->version, - 'token' => $response->headers->get('X-Debug-Token'), - 'symfony_version' => Kernel::VERSION, - 'name' => isset($this->kernel) ? $this->kernel->getName() : 'n/a', - 'env' => isset($this->kernel) ? $this->kernel->getEnvironment() : 'n/a', - 'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a', - 'php_version' => PHP_VERSION, - 'xdebug_enabled' => extension_loaded('xdebug'), - 'eaccel_enabled' => extension_loaded('eaccelerator') && ini_get('eaccelerator.enable'), - 'apc_enabled' => extension_loaded('apc') && ini_get('apc.enabled'), - 'xcache_enabled' => extension_loaded('xcache') && ini_get('xcache.cacher'), - 'wincache_enabled' => extension_loaded('wincache') && ini_get('wincache.ocenabled'), + 'app_name' => $this->name, + 'app_version' => $this->version, + 'token' => $response->headers->get('X-Debug-Token'), + 'symfony_version' => Kernel::VERSION, + 'name' => isset($this->kernel) ? $this->kernel->getName() : 'n/a', + 'env' => isset($this->kernel) ? $this->kernel->getEnvironment() : 'n/a', + 'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a', + 'php_version' => PHP_VERSION, + 'xdebug_enabled' => extension_loaded('xdebug'), + 'eaccel_enabled' => extension_loaded('eaccelerator') && ini_get('eaccelerator.enable'), + 'apc_enabled' => extension_loaded('apc') && ini_get('apc.enabled'), + 'xcache_enabled' => extension_loaded('xcache') && ini_get('xcache.cacher'), + 'wincache_enabled' => extension_loaded('wincache') && ini_get('wincache.ocenabled'), 'zend_opcache_enabled' => extension_loaded('Zend OPcache') && ini_get('opcache.enable'), - 'bundles' => array(), - 'sapi_name' => php_sapi_name(), + 'bundles' => array(), + 'sapi_name' => php_sapi_name(), ); if (isset($this->kernel)) { diff --git a/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php index cd7f787017..8a36840a2a 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php @@ -28,7 +28,7 @@ class EventDataCollector extends DataCollector public function collect(Request $request, Response $response, \Exception $exception = null) { $this->data = array( - 'called_listeners' => array(), + 'called_listeners' => array(), 'not_called_listeners' => array(), ); } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php index e8d92745ca..64c328cda2 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php @@ -39,8 +39,8 @@ class LoggerDataCollector extends DataCollector { if (null !== $this->logger) { $this->data = array( - 'error_count' => $this->logger->countErrors(), - 'logs' => $this->sanitizeLogs($this->logger->getLogs()), + 'error_count' => $this->logger->countErrors(), + 'logs' => $this->sanitizeLogs($this->logger->getLogs()), 'deprecation_count' => $this->computeDeprecationCount(), ); } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php index 502131147c..18d3d00037 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php @@ -24,7 +24,7 @@ class MemoryDataCollector extends DataCollector public function __construct() { $this->data = array( - 'memory' => 0, + 'memory' => 0, 'memory_limit' => $this->convertToBytes(ini_get('memory_limit')), ); } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php index 9371748e3c..f92f3e68c5 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php @@ -86,24 +86,24 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter $statusCode = $response->getStatusCode(); $this->data = array( - 'format' => $request->getRequestFormat(), - 'content' => $content, - 'content_type' => $response->headers->get('Content-Type') ? $response->headers->get('Content-Type') : 'text/html', - 'status_text' => isset(Response::$statusTexts[$statusCode]) ? Response::$statusTexts[$statusCode] : '', - 'status_code' => $statusCode, - 'request_query' => $request->query->all(), - 'request_request' => $request->request->all(), - 'request_headers' => $request->headers->all(), - 'request_server' => $request->server->all(), - 'request_cookies' => $request->cookies->all(), + 'format' => $request->getRequestFormat(), + 'content' => $content, + 'content_type' => $response->headers->get('Content-Type') ? $response->headers->get('Content-Type') : 'text/html', + 'status_text' => isset(Response::$statusTexts[$statusCode]) ? Response::$statusTexts[$statusCode] : '', + 'status_code' => $statusCode, + 'request_query' => $request->query->all(), + 'request_request' => $request->request->all(), + 'request_headers' => $request->headers->all(), + 'request_server' => $request->server->all(), + 'request_cookies' => $request->cookies->all(), 'request_attributes' => $attributes, - 'response_headers' => $responseHeaders, - 'session_metadata' => $sessionMetadata, + 'response_headers' => $responseHeaders, + 'session_metadata' => $sessionMetadata, 'session_attributes' => $sessionAttributes, - 'flashes' => $flashes, - 'path_info' => $request->getPathInfo(), - 'controller' => 'n/a', - 'locale' => $request->getLocale(), + 'flashes' => $flashes, + 'path_info' => $request->getPathInfo(), + 'controller' => 'n/a', + 'locale' => $request->getLocale(), ); if (isset($this->data['request_headers']['php-auth-pw'])) { @@ -120,29 +120,29 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter try { $r = new \ReflectionMethod($controller[0], $controller[1]); $this->data['controller'] = array( - 'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0], + 'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0], 'method' => $controller[1], - 'file' => $r->getFilename(), - 'line' => $r->getStartLine(), + 'file' => $r->getFilename(), + 'line' => $r->getStartLine(), ); } catch (\ReflectionException $re) { if (is_callable($controller)) { // using __call or __callStatic $this->data['controller'] = array( - 'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0], + 'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0], 'method' => $controller[1], - 'file' => 'n/a', - 'line' => 'n/a', + 'file' => 'n/a', + 'line' => 'n/a', ); } } } elseif ($controller instanceof \Closure) { $r = new \ReflectionFunction($controller); $this->data['controller'] = array( - 'class' => $r->getName(), + 'class' => $r->getName(), 'method' => null, - 'file' => $r->getFilename(), - 'line' => $r->getStartLine(), + 'file' => $r->getFilename(), + 'line' => $r->getStartLine(), ); } else { $this->data['controller'] = (string) $controller ?: 'n/a'; diff --git a/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php index a0fbac9472..05392a0a96 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php @@ -31,8 +31,8 @@ class RouterDataCollector extends DataCollector $this->data = array( 'redirect' => false, - 'url' => null, - 'route' => null, + 'url' => null, + 'route' => null, ); } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php index a700b864e2..1f71c3a153 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php @@ -42,7 +42,7 @@ class TimeDataCollector extends DataCollector $this->data = array( 'start_time' => $startTime * 1000, - 'events' => array(), + 'events' => array(), ); } diff --git a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php index baf96c0d0d..f0d6488dbf 100644 --- a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php @@ -289,10 +289,10 @@ class TraceableEventDispatcher implements EventDispatcherInterface, TraceableEve $line = null; } $info += array( - 'type' => 'Function', + 'type' => 'Function', 'function' => $listener, - 'file' => $file, - 'line' => $line, + 'file' => $file, + 'line' => $line, 'pretty' => $listener, ); } elseif (is_array($listener) || (is_object($listener) && is_callable($listener))) { @@ -309,11 +309,11 @@ class TraceableEventDispatcher implements EventDispatcherInterface, TraceableEve $line = null; } $info += array( - 'type' => 'Method', + 'type' => 'Method', 'class' => $class, 'method' => $listener[1], - 'file' => $file, - 'line' => $line, + 'file' => $file, + 'line' => $line, 'pretty' => $class.'::'.$listener[1], ); } diff --git a/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php b/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php index b4384544b2..b621bb2f57 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php @@ -53,12 +53,12 @@ class ExceptionListener implements EventSubscriberInterface $attributes = array( '_controller' => $this->controller, - 'exception' => FlattenException::create($exception), - 'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null, + 'exception' => FlattenException::create($exception), + 'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null, // keep for BC -- as $format can be an argument of the controller callable // see src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php // @deprecated in 2.4, to be removed in 3.0 - 'format' => $request->getRequestFormat(), + 'format' => $request->getRequestFormat(), ); $request = $request->duplicate(null, null, $attributes); diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index dfdcb9c5d8..18233adff7 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -85,13 +85,13 @@ class HttpCache implements HttpKernelInterface, TerminableInterface register_shutdown_function(array($this->store, 'cleanup')); $this->options = array_merge(array( - 'debug' => false, - 'default_ttl' => 0, - 'private_headers' => array('Authorization', 'Cookie'), - 'allow_reload' => false, - 'allow_revalidate' => false, + 'debug' => false, + 'default_ttl' => 0, + 'private_headers' => array('Authorization', 'Cookie'), + 'allow_reload' => false, + 'allow_revalidate' => false, 'stale_while_revalidate' => 2, - 'stale_if_error' => 60, + 'stale_if_error' => 60, ), $options); $this->esi = $esi; $this->traces = array(); diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index ce764540d2..66ab2cafb5 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.3.21-DEV'; - const VERSION_ID = '20321'; - const MAJOR_VERSION = '2'; - const MINOR_VERSION = '3'; + const VERSION = '2.3.21-DEV'; + const VERSION_ID = '20321'; + const MAJOR_VERSION = '2'; + const MINOR_VERSION = '3'; const RELEASE_VERSION = '21'; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = 'DEV'; /** * Constructor. @@ -586,14 +586,14 @@ abstract class Kernel implements KernelInterface, TerminableInterface return array_merge( array( - 'kernel.root_dir' => $this->rootDir, - 'kernel.environment' => $this->environment, - 'kernel.debug' => $this->debug, - 'kernel.name' => $this->name, - 'kernel.cache_dir' => $this->getCacheDir(), - 'kernel.logs_dir' => $this->getLogDir(), - 'kernel.bundles' => $bundles, - 'kernel.charset' => $this->getCharset(), + 'kernel.root_dir' => $this->rootDir, + 'kernel.environment' => $this->environment, + 'kernel.debug' => $this->debug, + 'kernel.name' => $this->name, + 'kernel.cache_dir' => $this->getCacheDir(), + 'kernel.logs_dir' => $this->getLogDir(), + 'kernel.bundles' => $bundles, + 'kernel.charset' => $this->getCharset(), 'kernel.container_class' => $this->getContainerClass(), ), $this->getEnvParameters() diff --git a/src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php index ba6f1952e4..949a63936d 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php @@ -77,12 +77,12 @@ abstract class BaseMemcacheProfilerStorage implements ProfilerStorageInterface continue; } - $result[$itemToken] = array( - 'token' => $itemToken, - 'ip' => $itemIp, + $result[$itemToken] = array( + 'token' => $itemToken, + 'ip' => $itemIp, 'method' => $itemMethod, - 'url' => $itemUrl, - 'time' => $itemTime, + 'url' => $itemUrl, + 'time' => $itemTime, 'parent' => $itemParent, ); --$limit; @@ -152,14 +152,14 @@ abstract class BaseMemcacheProfilerStorage implements ProfilerStorageInterface public function write(Profile $profile) { $data = array( - 'token' => $profile->getToken(), - 'parent' => $profile->getParentToken(), + 'token' => $profile->getToken(), + 'parent' => $profile->getParentToken(), 'children' => array_map(function ($p) { return $p->getToken(); }, $profile->getChildren()), - 'data' => $profile->getCollectors(), - 'ip' => $profile->getIp(), - 'method' => $profile->getMethod(), - 'url' => $profile->getUrl(), - 'time' => $profile->getTime(), + 'data' => $profile->getCollectors(), + 'ip' => $profile->getIp(), + 'method' => $profile->getMethod(), + 'url' => $profile->getUrl(), + 'time' => $profile->getTime(), ); $profileIndexed = false !== $this->getValue($this->getItemName($profile->getToken())); diff --git a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php index b7abad735c..b08c4bdd45 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php @@ -78,11 +78,11 @@ class FileProfilerStorage implements ProfilerStorageInterface } $result[$csvToken] = array( - 'token' => $csvToken, - 'ip' => $csvIp, + 'token' => $csvToken, + 'ip' => $csvIp, 'method' => $csvMethod, - 'url' => $csvUrl, - 'time' => $csvTime, + 'url' => $csvUrl, + 'time' => $csvTime, 'parent' => $csvParent, ); } @@ -140,14 +140,14 @@ class FileProfilerStorage implements ProfilerStorageInterface // Store profile $data = array( - 'token' => $profile->getToken(), - 'parent' => $profile->getParentToken(), + 'token' => $profile->getToken(), + 'parent' => $profile->getParentToken(), 'children' => array_map(function ($p) { return $p->getToken(); }, $profile->getChildren()), - 'data' => $profile->getCollectors(), - 'ip' => $profile->getIp(), - 'method' => $profile->getMethod(), - 'url' => $profile->getUrl(), - 'time' => $profile->getTime(), + 'data' => $profile->getCollectors(), + 'ip' => $profile->getIp(), + 'method' => $profile->getMethod(), + 'url' => $profile->getUrl(), + 'time' => $profile->getTime(), ); if (false === file_put_contents($file, serialize($data))) { diff --git a/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php index 453a9a80c3..16b8b2f060 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php @@ -86,13 +86,13 @@ abstract class PdoProfilerStorage implements ProfilerStorageInterface { $db = $this->initDb(); $args = array( - ':token' => $profile->getToken(), - ':parent' => $profile->getParentToken(), - ':data' => base64_encode(serialize($profile->getCollectors())), - ':ip' => $profile->getIp(), - ':method' => $profile->getMethod(), - ':url' => $profile->getUrl(), - ':time' => $profile->getTime(), + ':token' => $profile->getToken(), + ':parent' => $profile->getParentToken(), + ':data' => base64_encode(serialize($profile->getCollectors())), + ':ip' => $profile->getIp(), + ':method' => $profile->getMethod(), + ':url' => $profile->getUrl(), + ':time' => $profile->getTime(), ':created_at' => time(), ); diff --git a/src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php index d56e49dbae..e673986d65 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php @@ -88,11 +88,11 @@ class RedisProfilerStorage implements ProfilerStorageInterface } $result[] = array( - 'token' => $itemToken, - 'ip' => $itemIp, + 'token' => $itemToken, + 'ip' => $itemIp, 'method' => $itemMethod, - 'url' => $itemUrl, - 'time' => $itemTime, + 'url' => $itemUrl, + 'time' => $itemTime, 'parent' => $itemParent, ); --$limit; @@ -158,14 +158,14 @@ class RedisProfilerStorage implements ProfilerStorageInterface public function write(Profile $profile) { $data = array( - 'token' => $profile->getToken(), - 'parent' => $profile->getParentToken(), + 'token' => $profile->getToken(), + 'parent' => $profile->getParentToken(), 'children' => array_map(function ($p) { return $p->getToken(); }, $profile->getChildren()), - 'data' => $profile->getCollectors(), - 'ip' => $profile->getIp(), - 'method' => $profile->getMethod(), - 'url' => $profile->getUrl(), - 'time' => $profile->getTime(), + 'data' => $profile->getCollectors(), + 'ip' => $profile->getIp(), + 'method' => $profile->getMethod(), + 'url' => $profile->getUrl(), + 'time' => $profile->getTime(), ); $profileIndexed = false !== $this->getValue($this->getItemName($profile->getToken())); diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php index 992431aa53..13ffc77922 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php @@ -1060,21 +1060,21 @@ class HttpCacheTest extends HttpCacheTestCase { $responses = array( array( - 'status' => 200, - 'body' => ' ', + 'status' => 200, + 'body' => ' ', 'headers' => array( - 'Cache-Control' => 's-maxage=300', + 'Cache-Control' => 's-maxage=300', 'Surrogate-Control' => 'content="ESI/1.0"', ), ), array( - 'status' => 200, - 'body' => 'Hello World!', + 'status' => 200, + 'body' => 'Hello World!', 'headers' => array('Cache-Control' => 's-maxage=300'), ), array( - 'status' => 200, - 'body' => 'My name is Bobby.', + 'status' => 200, + 'body' => 'My name is Bobby.', 'headers' => array('Cache-Control' => 's-maxage=100'), ), ); @@ -1092,21 +1092,21 @@ class HttpCacheTest extends HttpCacheTestCase { $responses = array( array( - 'status' => 200, - 'body' => ' ', + 'status' => 200, + 'body' => ' ', 'headers' => array( - 'Cache-Control' => 's-maxage=300', + 'Cache-Control' => 's-maxage=300', 'Surrogate-Control' => 'content="ESI/1.0"', ), ), array( - 'status' => 200, - 'body' => 'Hello World!', + 'status' => 200, + 'body' => 'Hello World!', 'headers' => array('ETag' => 'foobar'), ), array( - 'status' => 200, - 'body' => 'My name is Bobby.', + 'status' => 200, + 'body' => 'My name is Bobby.', 'headers' => array('Cache-Control' => 's-maxage=100'), ), ); @@ -1125,17 +1125,17 @@ class HttpCacheTest extends HttpCacheTestCase { $responses = array( array( - 'status' => 200, - 'body' => '', + 'status' => 200, + 'body' => '', 'headers' => array( - 'Content-Length' => 26, - 'Cache-Control' => 's-maxage=300', + 'Content-Length' => 26, + 'Cache-Control' => 's-maxage=300', 'Surrogate-Control' => 'content="ESI/1.0"', ), ), array( - 'status' => 200, - 'body' => 'Hello World!', + 'status' => 200, + 'body' => 'Hello World!', 'headers' => array(), ), ); @@ -1216,8 +1216,8 @@ class HttpCacheTest extends HttpCacheTestCase $responses = array( array( - 'status' => 200, - 'body' => '', + 'status' => 200, + 'body' => '', 'headers' => array( 'Surrogate-Control' => 'content="ESI/1.0"', 'ETag' => 'hey', @@ -1225,8 +1225,8 @@ class HttpCacheTest extends HttpCacheTestCase ), ), array( - 'status' => 200, - 'body' => 'Hey!', + 'status' => 200, + 'body' => 'Hey!', 'headers' => array(), ), ); diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php index 6dd3d9e499..0ea3b4caa0 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php @@ -29,15 +29,15 @@ class TestMultipleHttpKernel extends HttpKernel implements ControllerResolverInt public function __construct($responses) { - $this->bodies = array(); + $this->bodies = array(); $this->statuses = array(); - $this->headers = array(); - $this->call = false; + $this->headers = array(); + $this->call = false; foreach ($responses as $response) { - $this->bodies[] = $response['body']; + $this->bodies[] = $response['body']; $this->statuses[] = $response['status']; - $this->headers[] = $response['headers']; + $this->headers[] = $response['headers']; } parent::__construct(new EventDispatcher(), $this); diff --git a/src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php b/src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php index 4657ff1d76..89d7503ffa 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php @@ -43,7 +43,7 @@ abstract class AbstractProfilerStorageTest extends \PHPUnit_Framework_TestCase // Load them from storage $parentProfile = $this->getStorage()->read('token_parent'); - $childProfile = $this->getStorage()->read('token_child'); + $childProfile = $this->getStorage()->read('token_child'); // Check child has link to parent $this->assertNotNull($childProfile->getParent()); diff --git a/src/Symfony/Component/Intl/Collator/Collator.php b/src/Symfony/Component/Intl/Collator/Collator.php index a0fefd3e40..3a17f36bdf 100644 --- a/src/Symfony/Component/Intl/Collator/Collator.php +++ b/src/Symfony/Component/Intl/Collator/Collator.php @@ -111,7 +111,7 @@ class Collator $intlToPlainFlagMap = array( self::SORT_REGULAR => \SORT_REGULAR, self::SORT_NUMERIC => \SORT_NUMERIC, - self::SORT_STRING => \SORT_STRING, + self::SORT_STRING => \SORT_STRING, ); $plainSortFlag = isset($intlToPlainFlagMap[$sortFlag]) ? $intlToPlainFlagMap[$sortFlag] : self::SORT_REGULAR; diff --git a/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php b/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php index bfd1f32448..d775808283 100644 --- a/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php +++ b/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php @@ -290,15 +290,15 @@ class FullTransformer { $options = $this->getDefaultValueForOptions($options); - $year = $options['year']; - $month = $options['month']; - $day = $options['day']; - $hour = $options['hour']; + $year = $options['year']; + $month = $options['month']; + $day = $options['day']; + $hour = $options['hour']; $hourInstance = $options['hourInstance']; - $minute = $options['minute']; - $second = $options['second']; - $marker = $options['marker']; - $timezone = $options['timezone']; + $minute = $options['minute']; + $second = $options['second']; + $marker = $options['marker']; + $timezone = $options['timezone']; // If month is false, return immediately (intl behavior) if (false === $month) { @@ -341,15 +341,15 @@ class FullTransformer private function getDefaultValueForOptions(array $options) { return array( - 'year' => isset($options['year']) ? $options['year'] : 1970, - 'month' => isset($options['month']) ? $options['month'] : 1, - 'day' => isset($options['day']) ? $options['day'] : 1, - 'hour' => isset($options['hour']) ? $options['hour'] : 0, + 'year' => isset($options['year']) ? $options['year'] : 1970, + 'month' => isset($options['month']) ? $options['month'] : 1, + 'day' => isset($options['day']) ? $options['day'] : 1, + 'hour' => isset($options['hour']) ? $options['hour'] : 0, 'hourInstance' => isset($options['hourInstance']) ? $options['hourInstance'] : null, - 'minute' => isset($options['minute']) ? $options['minute'] : 0, - 'second' => isset($options['second']) ? $options['second'] : 0, - 'marker' => isset($options['marker']) ? $options['marker'] : null, - 'timezone' => isset($options['timezone']) ? $options['timezone'] : null, + 'minute' => isset($options['minute']) ? $options['minute'] : 0, + 'second' => isset($options['second']) ? $options['second'] : 0, + 'marker' => isset($options['marker']) ? $options['marker'] : null, + 'timezone' => isset($options['timezone']) ? $options['timezone'] : null, ); } } diff --git a/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php b/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php index 96111b725e..8888eba746 100644 --- a/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php +++ b/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php @@ -80,9 +80,9 @@ class TimeZoneTransformer extends Transformer public static function getEtcTimeZoneId($formattedTimeZone) { if (preg_match('/GMT(?P[+-])(?P\d{2}):?(?P\d{2})/', $formattedTimeZone, $matches)) { - $hours = (int) $matches['hours']; + $hours = (int) $matches['hours']; $minutes = (int) $matches['minutes']; - $signal = $matches['signal'] == '-' ? '+' : '-'; + $signal = $matches['signal'] == '-' ? '+' : '-'; if (0 < $minutes) { throw new NotImplementedException(sprintf( diff --git a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php index a1b0563940..dcd418bbb7 100644 --- a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php +++ b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php @@ -77,11 +77,11 @@ class IntlDateFormatter * @var array */ private $defaultDateFormats = array( - self::NONE => '', - self::FULL => 'EEEE, LLLL d, y', - self::LONG => 'LLLL d, y', - self::MEDIUM => 'LLL d, y', - self::SHORT => 'M/d/yy', + self::NONE => '', + self::FULL => 'EEEE, LLLL d, y', + self::LONG => 'LLLL d, y', + self::MEDIUM => 'LLL d, y', + self::SHORT => 'M/d/yy', ); /** @@ -90,10 +90,10 @@ class IntlDateFormatter * @var array */ private $defaultTimeFormats = array( - self::FULL => 'h:mm:ss a zzzz', - self::LONG => 'h:mm:ss a z', + self::FULL => 'h:mm:ss a zzzz', + self::LONG => 'h:mm:ss a z', self::MEDIUM => 'h:mm:ss a', - self::SHORT => 'h:mm a', + self::SHORT => 'h:mm a', ); /** diff --git a/src/Symfony/Component/Intl/Locale/Locale.php b/src/Symfony/Component/Intl/Locale/Locale.php index 69459d5317..5141de1d38 100644 --- a/src/Symfony/Component/Intl/Locale/Locale.php +++ b/src/Symfony/Component/Intl/Locale/Locale.php @@ -28,16 +28,16 @@ class Locale /* Locale method constants */ const ACTUAL_LOCALE = 0; - const VALID_LOCALE = 1; + const VALID_LOCALE = 1; /* Language tags constants */ - const LANG_TAG = 'language'; - const EXTLANG_TAG = 'extlang'; - const SCRIPT_TAG = 'script'; - const REGION_TAG = 'region'; - const VARIANT_TAG = 'variant'; + const LANG_TAG = 'language'; + const EXTLANG_TAG = 'extlang'; + const SCRIPT_TAG = 'script'; + const REGION_TAG = 'region'; + const VARIANT_TAG = 'variant'; const GRANDFATHERED_LANG_TAG = 'grandfathered'; - const PRIVATE_TAG = 'private'; + const PRIVATE_TAG = 'private'; /** * Not supported. Returns the best available locale based on HTTP "Accept-Language" header according to RFC 2616 diff --git a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php index 4d7131e6dc..fe7d320624 100644 --- a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php +++ b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php @@ -41,91 +41,91 @@ use Symfony\Component\Intl\Locale\Locale; class NumberFormatter { /* Format style constants */ - const PATTERN_DECIMAL = 0; - const DECIMAL = 1; - const CURRENCY = 2; - const PERCENT = 3; - const SCIENTIFIC = 4; - const SPELLOUT = 5; - const ORDINAL = 6; - const DURATION = 7; + const PATTERN_DECIMAL = 0; + const DECIMAL = 1; + const CURRENCY = 2; + const PERCENT = 3; + const SCIENTIFIC = 4; + const SPELLOUT = 5; + const ORDINAL = 6; + const DURATION = 7; const PATTERN_RULEBASED = 9; - const IGNORE = 0; - const DEFAULT_STYLE = 1; + const IGNORE = 0; + const DEFAULT_STYLE = 1; /* Format type constants */ - const TYPE_DEFAULT = 0; - const TYPE_INT32 = 1; - const TYPE_INT64 = 2; - const TYPE_DOUBLE = 3; + const TYPE_DEFAULT = 0; + const TYPE_INT32 = 1; + const TYPE_INT64 = 2; + const TYPE_DOUBLE = 3; const TYPE_CURRENCY = 4; /* Numeric attribute constants */ - const PARSE_INT_ONLY = 0; - const GROUPING_USED = 1; - const DECIMAL_ALWAYS_SHOWN = 2; - const MAX_INTEGER_DIGITS = 3; - const MIN_INTEGER_DIGITS = 4; - const INTEGER_DIGITS = 5; - const MAX_FRACTION_DIGITS = 6; - const MIN_FRACTION_DIGITS = 7; - const FRACTION_DIGITS = 8; - const MULTIPLIER = 9; - const GROUPING_SIZE = 10; - const ROUNDING_MODE = 11; - const ROUNDING_INCREMENT = 12; - const FORMAT_WIDTH = 13; - const PADDING_POSITION = 14; + const PARSE_INT_ONLY = 0; + const GROUPING_USED = 1; + const DECIMAL_ALWAYS_SHOWN = 2; + const MAX_INTEGER_DIGITS = 3; + const MIN_INTEGER_DIGITS = 4; + const INTEGER_DIGITS = 5; + const MAX_FRACTION_DIGITS = 6; + const MIN_FRACTION_DIGITS = 7; + const FRACTION_DIGITS = 8; + const MULTIPLIER = 9; + const GROUPING_SIZE = 10; + const ROUNDING_MODE = 11; + const ROUNDING_INCREMENT = 12; + const FORMAT_WIDTH = 13; + const PADDING_POSITION = 14; const SECONDARY_GROUPING_SIZE = 15; const SIGNIFICANT_DIGITS_USED = 16; - const MIN_SIGNIFICANT_DIGITS = 17; - const MAX_SIGNIFICANT_DIGITS = 18; - const LENIENT_PARSE = 19; + const MIN_SIGNIFICANT_DIGITS = 17; + const MAX_SIGNIFICANT_DIGITS = 18; + const LENIENT_PARSE = 19; /* Text attribute constants */ - const POSITIVE_PREFIX = 0; - const POSITIVE_SUFFIX = 1; - const NEGATIVE_PREFIX = 2; - const NEGATIVE_SUFFIX = 3; + const POSITIVE_PREFIX = 0; + const POSITIVE_SUFFIX = 1; + const NEGATIVE_PREFIX = 2; + const NEGATIVE_SUFFIX = 3; const PADDING_CHARACTER = 4; - const CURRENCY_CODE = 5; - const DEFAULT_RULESET = 6; - const PUBLIC_RULESETS = 7; + const CURRENCY_CODE = 5; + const DEFAULT_RULESET = 6; + const PUBLIC_RULESETS = 7; /* Format symbol constants */ - const DECIMAL_SEPARATOR_SYMBOL = 0; - const GROUPING_SEPARATOR_SYMBOL = 1; - const PATTERN_SEPARATOR_SYMBOL = 2; - const PERCENT_SYMBOL = 3; - const ZERO_DIGIT_SYMBOL = 4; - const DIGIT_SYMBOL = 5; - const MINUS_SIGN_SYMBOL = 6; - const PLUS_SIGN_SYMBOL = 7; - const CURRENCY_SYMBOL = 8; - const INTL_CURRENCY_SYMBOL = 9; - const MONETARY_SEPARATOR_SYMBOL = 10; - const EXPONENTIAL_SYMBOL = 11; - const PERMILL_SYMBOL = 12; - const PAD_ESCAPE_SYMBOL = 13; - const INFINITY_SYMBOL = 14; - const NAN_SYMBOL = 15; - const SIGNIFICANT_DIGIT_SYMBOL = 16; + const DECIMAL_SEPARATOR_SYMBOL = 0; + const GROUPING_SEPARATOR_SYMBOL = 1; + const PATTERN_SEPARATOR_SYMBOL = 2; + const PERCENT_SYMBOL = 3; + const ZERO_DIGIT_SYMBOL = 4; + const DIGIT_SYMBOL = 5; + const MINUS_SIGN_SYMBOL = 6; + const PLUS_SIGN_SYMBOL = 7; + const CURRENCY_SYMBOL = 8; + const INTL_CURRENCY_SYMBOL = 9; + const MONETARY_SEPARATOR_SYMBOL = 10; + const EXPONENTIAL_SYMBOL = 11; + const PERMILL_SYMBOL = 12; + const PAD_ESCAPE_SYMBOL = 13; + const INFINITY_SYMBOL = 14; + const NAN_SYMBOL = 15; + const SIGNIFICANT_DIGIT_SYMBOL = 16; const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17; /* Rounding mode values used by NumberFormatter::setAttribute() with NumberFormatter::ROUNDING_MODE attribute */ - const ROUND_CEILING = 0; - const ROUND_FLOOR = 1; - const ROUND_DOWN = 2; - const ROUND_UP = 3; + const ROUND_CEILING = 0; + const ROUND_FLOOR = 1; + const ROUND_DOWN = 2; + const ROUND_UP = 3; const ROUND_HALFEVEN = 4; const ROUND_HALFDOWN = 5; - const ROUND_HALFUP = 6; + const ROUND_HALFUP = 6; /* Pad position values used by NumberFormatter::setAttribute() with NumberFormatter::PADDING_POSITION attribute */ const PAD_BEFORE_PREFIX = 0; - const PAD_AFTER_PREFIX = 1; + const PAD_AFTER_PREFIX = 1; const PAD_BEFORE_SUFFIX = 2; - const PAD_AFTER_SUFFIX = 3; + const PAD_AFTER_SUFFIX = 3; /** * The error code from the last operation @@ -153,8 +153,8 @@ class NumberFormatter */ private $attributes = array( self::FRACTION_DIGITS => 0, - self::GROUPING_USED => 1, - self::ROUNDING_MODE => self::ROUND_HALFEVEN, + self::GROUPING_USED => 1, + self::ROUNDING_MODE => self::ROUND_HALFEVEN, ); /** @@ -171,7 +171,7 @@ class NumberFormatter */ private static $supportedStyles = array( 'CURRENCY' => self::CURRENCY, - 'DECIMAL' => self::DECIMAL, + 'DECIMAL' => self::DECIMAL, ); /** @@ -181,8 +181,8 @@ class NumberFormatter */ private static $supportedAttributes = array( 'FRACTION_DIGITS' => self::FRACTION_DIGITS, - 'GROUPING_USED' => self::GROUPING_USED, - 'ROUNDING_MODE' => self::ROUNDING_MODE, + 'GROUPING_USED' => self::GROUPING_USED, + 'ROUNDING_MODE' => self::ROUNDING_MODE, ); /** @@ -195,7 +195,7 @@ class NumberFormatter private static $roundingModes = array( 'ROUND_HALFEVEN' => self::ROUND_HALFEVEN, 'ROUND_HALFDOWN' => self::ROUND_HALFDOWN, - 'ROUND_HALFUP' => self::ROUND_HALFUP, + 'ROUND_HALFUP' => self::ROUND_HALFUP, ); /** @@ -209,7 +209,7 @@ class NumberFormatter private static $phpRoundingMap = array( self::ROUND_HALFDOWN => \PHP_ROUND_HALF_DOWN, self::ROUND_HALFEVEN => \PHP_ROUND_HALF_EVEN, - self::ROUND_HALFUP => \PHP_ROUND_HALF_UP, + self::ROUND_HALFUP => \PHP_ROUND_HALF_UP, ); /** @@ -276,7 +276,7 @@ class NumberFormatter throw new MethodArgumentNotImplementedException(__METHOD__, 'pattern'); } - $this->style = $style; + $this->style = $style; } /** diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php index 212a115d6e..68235a5429 100644 --- a/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php @@ -41,14 +41,14 @@ class IntlDateFormatterTest extends AbstractIntlDateFormatterTest $formatter = $this->getDefaultDateFormatter(); $localtime = array( - 'tm_sec' => 59, - 'tm_min' => 3, - 'tm_hour' => 15, - 'tm_mday' => 15, - 'tm_mon' => 3, - 'tm_year' => 112, - 'tm_wday' => 0, - 'tm_yday' => 105, + 'tm_sec' => 59, + 'tm_min' => 3, + 'tm_hour' => 15, + 'tm_mday' => 15, + 'tm_mon' => 3, + 'tm_year' => 112, + 'tm_wday' => 0, + 'tm_yday' => 105, 'tm_isdst' => 0, ); diff --git a/src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php b/src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php index 7da0e2a533..94572e6f2a 100644 --- a/src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php +++ b/src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php @@ -28,8 +28,8 @@ class LocaleTest extends AbstractLocaleTest { $subtags = array( 'language' => 'pt', - 'script' => 'Latn', - 'region' => 'BR', + 'script' => 'Latn', + 'region' => 'BR', ); $this->call('composeLocale', $subtags); } diff --git a/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php b/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php index c52fab4b7b..1a9035668d 100644 --- a/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php +++ b/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php @@ -38,7 +38,7 @@ class PhpGeneratorDumper extends GeneratorDumper public function dump(array $options = array()) { $options = array_merge(array( - 'class' => 'ProjectUrlGenerator', + 'class' => 'ProjectUrlGenerator', 'base_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', ), $options); diff --git a/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php b/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php index f0777a05b3..82fe6abd95 100644 --- a/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php +++ b/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php @@ -109,13 +109,13 @@ abstract class AnnotationClassLoader implements LoaderInterface } $globals = array( - 'path' => '', + 'path' => '', 'requirements' => array(), - 'options' => array(), - 'defaults' => array(), - 'schemes' => array(), - 'methods' => array(), - 'host' => '', + 'options' => array(), + 'defaults' => array(), + 'schemes' => array(), + 'methods' => array(), + 'host' => '', ); $class = new \ReflectionClass($class); diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php index 9ff74499c3..9e3f075aca 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -39,7 +39,7 @@ class ApacheMatcherDumper extends MatcherDumper { $options = array_merge(array( 'script_name' => 'app.php', - 'base_uri' => '', + 'base_uri' => '', ), $options); $options['script_name'] = self::escape($options['script_name'], ' ', '\\'); @@ -133,10 +133,10 @@ class ApacheMatcherDumper extends MatcherDumper } foreach ($this->normalizeValues($route->getDefaults()) as $key => $value) { $variables[] = 'E=_ROUTING_default_'.$key.':'.strtr($value, array( - ':' => '\\:', - '=' => '\\=', + ':' => '\\:', + '=' => '\\=', '\\' => '\\\\', - ' ' => '\\ ', + ' ' => '\\ ', )); } $variables = implode(',', $variables); diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php index 195c56e99e..40b22efe7b 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -38,7 +38,7 @@ class PhpMatcherDumper extends MatcherDumper public function dump(array $options = array()) { $options = array_replace(array( - 'class' => 'ProjectUrlMatcher', + 'class' => 'ProjectUrlMatcher', 'base_class' => 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher', ), $options); diff --git a/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php b/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php index ff560c76ca..d2504aee31 100644 --- a/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php @@ -24,7 +24,7 @@ class TraceableUrlMatcher extends UrlMatcher { const ROUTE_DOES_NOT_MATCH = 0; const ROUTE_ALMOST_MATCHES = 1; - const ROUTE_MATCHES = 2; + const ROUTE_MATCHES = 2; protected $traces; @@ -111,10 +111,10 @@ class TraceableUrlMatcher extends UrlMatcher private function addTrace($log, $level = self::ROUTE_DOES_NOT_MATCH, $name = null, $route = null) { $this->traces[] = array( - 'log' => $log, - 'name' => $name, + 'log' => $log, + 'name' => $name, 'level' => $level, - 'path' => null !== $route ? $route->getPath() : null, + 'path' => null !== $route ? $route->getPath() : null, ); } } diff --git a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php index db18ec4e7b..1b0e78307e 100644 --- a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php @@ -26,9 +26,9 @@ use Symfony\Component\Routing\Route; */ class UrlMatcher implements UrlMatcherInterface { - const REQUIREMENT_MATCH = 0; - const REQUIREMENT_MISMATCH = 1; - const ROUTE_MATCH = 2; + const REQUIREMENT_MATCH = 0; + const REQUIREMENT_MISMATCH = 1; + const ROUTE_MATCH = 2; /** * @var RequestContext diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index 0adf704a1a..02fc6de24a 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -98,13 +98,13 @@ class Route implements \Serializable public function serialize() { return serialize(array( - 'path' => $this->path, - 'host' => $this->host, - 'defaults' => $this->defaults, + 'path' => $this->path, + 'host' => $this->host, + 'defaults' => $this->defaults, 'requirements' => $this->requirements, - 'options' => $this->options, - 'schemes' => $this->schemes, - 'methods' => $this->methods, + 'options' => $this->options, + 'schemes' => $this->schemes, + 'methods' => $this->methods, )); } diff --git a/src/Symfony/Component/Routing/Router.php b/src/Symfony/Component/Routing/Router.php index 35b6e2a54f..37d3bc74cf 100644 --- a/src/Symfony/Component/Routing/Router.php +++ b/src/Symfony/Component/Routing/Router.php @@ -100,18 +100,18 @@ class Router implements RouterInterface public function setOptions(array $options) { $this->options = array( - 'cache_dir' => null, - 'debug' => false, - 'generator_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', - 'generator_base_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', + 'cache_dir' => null, + 'debug' => false, + 'generator_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', + 'generator_base_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', 'generator_dumper_class' => 'Symfony\\Component\\Routing\\Generator\\Dumper\\PhpGeneratorDumper', - 'generator_cache_class' => 'ProjectUrlGenerator', - 'matcher_class' => 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher', - 'matcher_base_class' => 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher', - 'matcher_dumper_class' => 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherDumper', - 'matcher_cache_class' => 'ProjectUrlMatcher', - 'resource_type' => null, - 'strict_requirements' => true, + 'generator_cache_class' => 'ProjectUrlGenerator', + 'matcher_class' => 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher', + 'matcher_base_class' => 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher', + 'matcher_dumper_class' => 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherDumper', + 'matcher_cache_class' => 'ProjectUrlMatcher', + 'resource_type' => null, + 'strict_requirements' => true, ); // check option names and live merge, if errors are encountered Exception will be thrown @@ -236,7 +236,7 @@ class Router implements RouterInterface $dumper = new $this->options['matcher_dumper_class']($this->getRouteCollection()); $options = array( - 'class' => $class, + 'class' => $class, 'base_class' => $this->options['matcher_base_class'], ); @@ -268,7 +268,7 @@ class Router implements RouterInterface $dumper = new $this->options['generator_dumper_class']($this->getRouteCollection()); $options = array( - 'class' => $class, + 'class' => $class, 'base_class' => $this->options['generator_base_class'], ); diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php b/src/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php index e95c1f266b..15937bcf02 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php @@ -23,8 +23,8 @@ class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatche { return array( '_controller' => 'Some controller reference...', - 'path' => $path, - 'scheme' => $scheme, + 'path' => $path, + 'scheme' => $scheme, ); } } diff --git a/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php b/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php index 376cc5b560..65c54f596f 100644 --- a/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php +++ b/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php @@ -64,9 +64,9 @@ class PhpGeneratorDumperTest extends \PHPUnit_Framework_TestCase $projectUrlGenerator = new \ProjectUrlGenerator(new RequestContext('/app.php')); - $absoluteUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), true); + $absoluteUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), true); $absoluteUrlWithoutParameter = $projectUrlGenerator->generate('Test2', array(), true); - $relativeUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), false); + $relativeUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), false); $relativeUrlWithoutParameter = $projectUrlGenerator->generate('Test2', array(), false); $this->assertEquals($absoluteUrlWithParameter, 'http://localhost/app.php/testing/bar'); diff --git a/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php index a8ebc3281d..162e4f5437 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php @@ -95,13 +95,13 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest public function testLoad($className, $routeDatas = array(), $methodArgs = array()) { $routeDatas = array_replace(array( - 'name' => 'route', - 'path' => '/', + 'name' => 'route', + 'path' => '/', 'requirements' => array(), - 'options' => array(), - 'defaults' => array(), - 'schemes' => array(), - 'methods' => array(), + 'options' => array(), + 'defaults' => array(), + 'schemes' => array(), + 'methods' => array(), ), $routeDatas); $this->reader diff --git a/src/Symfony/Component/Routing/Tests/RouteTest.php b/src/Symfony/Component/Routing/Tests/RouteTest.php index a7a4181559..494ea58b87 100644 --- a/src/Symfony/Component/Routing/Tests/RouteTest.php +++ b/src/Symfony/Component/Routing/Tests/RouteTest.php @@ -52,7 +52,7 @@ class RouteTest extends \PHPUnit_Framework_TestCase $route = new Route('/{foo}'); $route->setOptions(array('foo' => 'bar')); $this->assertEquals(array_merge(array( - 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', + 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', ), array('foo' => 'bar')), $route->getOptions(), '->setOptions() sets the options'); $this->assertEquals($route, $route->setOptions(array()), '->setOptions() implements a fluent interface'); diff --git a/src/Symfony/Component/Security/Acl/Domain/PermissionGrantingStrategy.php b/src/Symfony/Component/Security/Acl/Domain/PermissionGrantingStrategy.php index 0ca078534c..81ed9d86e2 100644 --- a/src/Symfony/Component/Security/Acl/Domain/PermissionGrantingStrategy.php +++ b/src/Symfony/Component/Security/Acl/Domain/PermissionGrantingStrategy.php @@ -26,8 +26,8 @@ use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; class PermissionGrantingStrategy implements PermissionGrantingStrategyInterface { const EQUAL = 'equal'; - const ALL = 'all'; - const ANY = 'any'; + const ALL = 'all'; + const ANY = 'any'; private $auditLogger; @@ -136,7 +136,7 @@ class PermissionGrantingStrategy implements PermissionGrantingStrategyInterface */ private function hasSufficientPermissions(AclInterface $acl, array $aces, array $masks, array $sids, $administrativeMode) { - $firstRejectedAce = null; + $firstRejectedAce = null; foreach ($masks as $requiredMask) { foreach ($sids as $sid) { diff --git a/src/Symfony/Component/Security/Acl/Permission/BasicPermissionMap.php b/src/Symfony/Component/Security/Acl/Permission/BasicPermissionMap.php index fa3d543184..4e26c0281e 100644 --- a/src/Symfony/Component/Security/Acl/Permission/BasicPermissionMap.php +++ b/src/Symfony/Component/Security/Acl/Permission/BasicPermissionMap.php @@ -19,14 +19,14 @@ namespace Symfony\Component\Security\Acl\Permission; */ class BasicPermissionMap implements PermissionMapInterface { - const PERMISSION_VIEW = 'VIEW'; - const PERMISSION_EDIT = 'EDIT'; - const PERMISSION_CREATE = 'CREATE'; - const PERMISSION_DELETE = 'DELETE'; - const PERMISSION_UNDELETE = 'UNDELETE'; - const PERMISSION_OPERATOR = 'OPERATOR'; - const PERMISSION_MASTER = 'MASTER'; - const PERMISSION_OWNER = 'OWNER'; + const PERMISSION_VIEW = 'VIEW'; + const PERMISSION_EDIT = 'EDIT'; + const PERMISSION_CREATE = 'CREATE'; + const PERMISSION_DELETE = 'DELETE'; + const PERMISSION_UNDELETE = 'UNDELETE'; + const PERMISSION_OPERATOR = 'OPERATOR'; + const PERMISSION_MASTER = 'MASTER'; + const PERMISSION_OWNER = 'OWNER'; protected $map; diff --git a/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php b/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php index 8ca25bcff5..bcf03c5112 100644 --- a/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php +++ b/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php @@ -44,28 +44,28 @@ namespace Symfony\Component\Security\Acl\Permission; */ class MaskBuilder { - const MASK_VIEW = 1; // 1 << 0 - const MASK_CREATE = 2; // 1 << 1 - const MASK_EDIT = 4; // 1 << 2 - const MASK_DELETE = 8; // 1 << 3 - const MASK_UNDELETE = 16; // 1 << 4 - const MASK_OPERATOR = 32; // 1 << 5 - const MASK_MASTER = 64; // 1 << 6 - const MASK_OWNER = 128; // 1 << 7 - const MASK_IDDQD = 1073741823; // 1 << 0 | 1 << 1 | ... | 1 << 30 + const MASK_VIEW = 1; // 1 << 0 + const MASK_CREATE = 2; // 1 << 1 + const MASK_EDIT = 4; // 1 << 2 + const MASK_DELETE = 8; // 1 << 3 + const MASK_UNDELETE = 16; // 1 << 4 + const MASK_OPERATOR = 32; // 1 << 5 + const MASK_MASTER = 64; // 1 << 6 + const MASK_OWNER = 128; // 1 << 7 + const MASK_IDDQD = 1073741823; // 1 << 0 | 1 << 1 | ... | 1 << 30 - const CODE_VIEW = 'V'; - const CODE_CREATE = 'C'; - const CODE_EDIT = 'E'; - const CODE_DELETE = 'D'; - const CODE_UNDELETE = 'U'; - const CODE_OPERATOR = 'O'; - const CODE_MASTER = 'M'; - const CODE_OWNER = 'N'; + const CODE_VIEW = 'V'; + const CODE_CREATE = 'C'; + const CODE_EDIT = 'E'; + const CODE_DELETE = 'D'; + const CODE_UNDELETE = 'U'; + const CODE_OPERATOR = 'O'; + const CODE_MASTER = 'M'; + const CODE_OWNER = 'N'; - const ALL_OFF = '................................'; - const OFF = '.'; - const ON = '*'; + const ALL_OFF = '................................'; + const OFF = '.'; + const ON = '*'; private $mask; diff --git a/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php b/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php index 4a5ca05ce9..722c4c4a9d 100644 --- a/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php +++ b/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php @@ -17,20 +17,20 @@ use Symfony\Component\Security\Acl\Dbal\Schema; $loader = new ClassLoader(); $loader->addPrefixes(array( - 'Symfony' => __DIR__.'/../../../../../..', - 'Doctrine\\Common' => __DIR__.'/../../../../../../../vendor/doctrine-common/lib', + 'Symfony' => __DIR__.'/../../../../../..', + 'Doctrine\\Common' => __DIR__.'/../../../../../../../vendor/doctrine-common/lib', 'Doctrine\\DBAL\\Migrations' => __DIR__.'/../../../../../../../vendor/doctrine-migrations/lib', - 'Doctrine\\DBAL' => __DIR__.'/../../../../../../../vendor/doctrine-dbal/lib', - 'Doctrine' => __DIR__.'/../../../../../../../vendor/doctrine/lib', + 'Doctrine\\DBAL' => __DIR__.'/../../../../../../../vendor/doctrine-dbal/lib', + 'Doctrine' => __DIR__.'/../../../../../../../vendor/doctrine/lib', )); $loader->register(); $schema = new Schema(array( - 'class_table_name' => 'acl_classes', - 'entry_table_name' => 'acl_entries', - 'oid_table_name' => 'acl_object_identities', + 'class_table_name' => 'acl_classes', + 'entry_table_name' => 'acl_entries', + 'oid_table_name' => 'acl_object_identities', 'oid_ancestors_table_name' => 'acl_object_identity_ancestors', - 'sid_table_name' => 'acl_security_identities', + 'sid_table_name' => 'acl_security_identities', )); $reflection = new ReflectionClass('Doctrine\\DBAL\\Platforms\\AbstractPlatform'); diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php b/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php index 79fa69f8a9..f955e65e48 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php @@ -22,7 +22,7 @@ interface VoterInterface { const ACCESS_GRANTED = 1; const ACCESS_ABSTAIN = 0; - const ACCESS_DENIED = -1; + const ACCESS_DENIED = -1; /** * Checks if the voter supports the given attribute. diff --git a/src/Symfony/Component/Security/Core/SecurityContextInterface.php b/src/Symfony/Component/Security/Core/SecurityContextInterface.php index ca816a8e48..50c30bb512 100644 --- a/src/Symfony/Component/Security/Core/SecurityContextInterface.php +++ b/src/Symfony/Component/Security/Core/SecurityContextInterface.php @@ -20,9 +20,9 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; */ interface SecurityContextInterface { - const ACCESS_DENIED_ERROR = '_security.403_error'; + const ACCESS_DENIED_ERROR = '_security.403_error'; const AUTHENTICATION_ERROR = '_security.last_error'; - const LAST_USERNAME = '_security.last_username'; + const LAST_USERNAME = '_security.last_username'; /** * Returns the current security token. diff --git a/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php b/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php index db96e67b56..b3c5c4dac9 100644 --- a/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php +++ b/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php @@ -46,13 +46,13 @@ class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandle public function __construct(HttpKernelInterface $httpKernel, HttpUtils $httpUtils, array $options, LoggerInterface $logger = null) { $this->httpKernel = $httpKernel; - $this->httpUtils = $httpUtils; - $this->logger = $logger; + $this->httpUtils = $httpUtils; + $this->logger = $logger; $this->options = array_merge(array( - 'failure_path' => null, - 'failure_forward' => false, - 'login_path' => '/login', + 'failure_path' => null, + 'failure_forward' => false, + 'login_path' => '/login', 'failure_path_parameter' => '_failure_path', ), $options); } diff --git a/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php b/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php index 54d6fc1585..591a28d65a 100644 --- a/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php +++ b/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php @@ -36,14 +36,14 @@ class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandle */ public function __construct(HttpUtils $httpUtils, array $options) { - $this->httpUtils = $httpUtils; + $this->httpUtils = $httpUtils; $this->options = array_merge(array( 'always_use_default_target_path' => false, - 'default_target_path' => '/', - 'login_path' => '/login', - 'target_path_parameter' => '_target_path', - 'use_referer' => false, + 'default_target_path' => '/', + 'login_path' => '/login', + 'target_path_parameter' => '_target_path', + 'use_referer' => false, ), $options); } diff --git a/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php index 80bfcd0b96..2b3d386231 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php @@ -92,15 +92,15 @@ abstract class AbstractAuthenticationListener implements ListenerInterface $this->successHandler = $successHandler; $this->failureHandler = $failureHandler; $this->options = array_merge(array( - 'check_path' => '/login_check', - 'login_path' => '/login', + 'check_path' => '/login_check', + 'login_path' => '/login', 'always_use_default_target_path' => false, - 'default_target_path' => '/', - 'target_path_parameter' => '_target_path', - 'use_referer' => false, - 'failure_path' => null, - 'failure_forward' => false, - 'require_previous_session' => true, + 'default_target_path' => '/', + 'target_path_parameter' => '_target_path', + 'use_referer' => false, + 'failure_path' => null, + 'failure_forward' => false, + 'require_previous_session' => true, ), $options); $this->logger = $logger; $this->dispatcher = $dispatcher; diff --git a/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php index 59f05ff625..446dfecec7 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php @@ -31,8 +31,8 @@ class AnonymousAuthenticationListener implements ListenerInterface public function __construct(SecurityContextInterface $context, $key, LoggerInterface $logger = null) { $this->context = $context; - $this->key = $key; - $this->logger = $logger; + $this->key = $key; + $this->logger = $logger; } /** diff --git a/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php b/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php index 722f4a1389..2faf9c7574 100644 --- a/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php @@ -50,8 +50,8 @@ class LogoutListener implements ListenerInterface $this->httpUtils = $httpUtils; $this->options = array_merge(array( 'csrf_parameter' => '_csrf_token', - 'intention' => 'logout', - 'logout_path' => '/logout', + 'intention' => 'logout', + 'logout_path' => '/logout', ), $options); $this->successHandler = $successHandler; $this->csrfProvider = $csrfProvider; diff --git a/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php index 81c2b374d0..2147817535 100644 --- a/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php @@ -42,9 +42,9 @@ class UsernamePasswordFormAuthenticationListener extends AbstractAuthenticationL parent::__construct($securityContext, $authenticationManager, $sessionStrategy, $httpUtils, $providerKey, $successHandler, $failureHandler, array_merge(array( 'username_parameter' => '_username', 'password_parameter' => '_password', - 'csrf_parameter' => '_csrf_token', - 'intention' => 'authenticate', - 'post_only' => true, + 'csrf_parameter' => '_csrf_token', + 'intention' => 'authenticate', + 'post_only' => true, ), $options), $logger, $dispatcher); $this->csrfProvider = $csrfProvider; diff --git a/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php b/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php index 17160a18ef..0e688c7d3e 100644 --- a/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php +++ b/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php @@ -26,9 +26,9 @@ use Symfony\Component\HttpFoundation\Request; */ class SessionAuthenticationStrategy implements SessionAuthenticationStrategyInterface { - const NONE = 'none'; - const MIGRATE = 'migrate'; - const INVALIDATE = 'invalidate'; + const NONE = 'none'; + const MIGRATE = 'migrate'; + const INVALIDATE = 'invalidate'; private $strategy; diff --git a/src/Symfony/Component/Security/Tests/Core/User/InMemoryUserProviderTest.php b/src/Symfony/Component/Security/Tests/Core/User/InMemoryUserProviderTest.php index 275426cdf1..826e3908bb 100644 --- a/src/Symfony/Component/Security/Tests/Core/User/InMemoryUserProviderTest.php +++ b/src/Symfony/Component/Security/Tests/Core/User/InMemoryUserProviderTest.php @@ -21,8 +21,8 @@ class InMemoryUserProviderTest extends \PHPUnit_Framework_TestCase $provider = new InMemoryUserProvider(array( 'fabien' => array( 'password' => 'foo', - 'enabled' => false, - 'roles' => array('ROLE_USER'), + 'enabled' => false, + 'roles' => array('ROLE_USER'), ), )); diff --git a/src/Symfony/Component/Security/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php b/src/Symfony/Component/Security/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php index c3a8370a79..600f5182ff 100644 --- a/src/Symfony/Component/Security/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php +++ b/src/Symfony/Component/Security/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator; class UserPasswordValidatorTest extends \PHPUnit_Framework_TestCase { - const PASSWORD_VALID = true; + const PASSWORD_VALID = true; const PASSWORD_INVALID = false; protected $context; diff --git a/src/Symfony/Component/Security/Tests/Http/Firewall/BasicAuthenticationListenerTest.php b/src/Symfony/Component/Security/Tests/Http/Firewall/BasicAuthenticationListenerTest.php index b345178c33..2c944635ea 100644 --- a/src/Symfony/Component/Security/Tests/Http/Firewall/BasicAuthenticationListenerTest.php +++ b/src/Symfony/Component/Security/Tests/Http/Firewall/BasicAuthenticationListenerTest.php @@ -39,7 +39,7 @@ class BasicAuthenticationListenerTest extends \PHPUnit_Framework_TestCase { $request = new Request(array(), array(), array(), array(), array(), array( 'PHP_AUTH_USER' => 'TheUsername', - 'PHP_AUTH_PW' => 'ThePassword', + 'PHP_AUTH_PW' => 'ThePassword', )); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); @@ -85,7 +85,7 @@ class BasicAuthenticationListenerTest extends \PHPUnit_Framework_TestCase { $request = new Request(array(), array(), array(), array(), array(), array( 'PHP_AUTH_USER' => 'TheUsername', - 'PHP_AUTH_PW' => 'ThePassword', + 'PHP_AUTH_PW' => 'ThePassword', )); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); @@ -214,7 +214,7 @@ class BasicAuthenticationListenerTest extends \PHPUnit_Framework_TestCase { $request = new Request(array(), array(), array(), array(), array(), array( 'PHP_AUTH_USER' => 'TheUsername', - 'PHP_AUTH_PW' => 'ThePassword', + 'PHP_AUTH_PW' => 'ThePassword', )); $token = new PreAuthenticatedToken('TheUser', 'TheCredentials', 'TheProviderKey', array('ROLE_FOO')); diff --git a/src/Symfony/Component/Security/Tests/Http/Firewall/LogoutListenerTest.php b/src/Symfony/Component/Security/Tests/Http/Firewall/LogoutListenerTest.php index 456b281d12..58f6adb295 100644 --- a/src/Symfony/Component/Security/Tests/Http/Firewall/LogoutListenerTest.php +++ b/src/Symfony/Component/Security/Tests/Http/Firewall/LogoutListenerTest.php @@ -236,9 +236,9 @@ class LogoutListenerTest extends \PHPUnit_Framework_TestCase $successHandler ?: $this->getSuccessHandler(), $options = array( 'csrf_parameter' => '_csrf_token', - 'intention' => 'logout', - 'logout_path' => '/logout', - 'target_url' => '/', + 'intention' => 'logout', + 'logout_path' => '/logout', + 'target_url' => '/', ), $csrfProvider ); diff --git a/src/Symfony/Component/Security/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php b/src/Symfony/Component/Security/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php index 0d485f30bc..4421bbfa26 100644 --- a/src/Symfony/Component/Security/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php +++ b/src/Symfony/Component/Security/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php @@ -296,7 +296,7 @@ class PersistentTokenBasedRememberMeServicesTest extends \PHPUnit_Framework_Test $service->loginSuccess($request, $response, $token); $cookies = $response->headers->getCookies(ResponseHeaderBag::COOKIES_ARRAY); - $cookie = $cookies['myfoodomain.foo']['/foo/path']['foo']; + $cookie = $cookies['myfoodomain.foo']['/foo/path']['foo']; $this->assertFalse($cookie->isCleared()); $this->assertTrue($cookie->isSecure()); $this->assertTrue($cookie->isHttpOnly()); diff --git a/src/Symfony/Component/Security/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php b/src/Symfony/Component/Security/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php index 3ff2ea648f..a301f36c7b 100644 --- a/src/Symfony/Component/Security/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php +++ b/src/Symfony/Component/Security/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php @@ -227,7 +227,7 @@ class TokenBasedRememberMeServicesTest extends \PHPUnit_Framework_TestCase $service->loginSuccess($request, $response, $token); $cookies = $response->headers->getCookies(ResponseHeaderBag::COOKIES_ARRAY); - $cookie = $cookies['myfoodomain.foo']['/foo/path']['foo']; + $cookie = $cookies['myfoodomain.foo']['/foo/path']['foo']; $this->assertFalse($cookie->isCleared()); $this->assertTrue($cookie->isSecure()); $this->assertTrue($cookie->isHttpOnly()); diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index 6fa42c241e..91b465535e 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -88,9 +88,9 @@ class JsonDecode implements DecoderInterface { $context = $this->resolveContext($context); - $associative = $context['json_decode_associative']; + $associative = $context['json_decode_associative']; $recursionDepth = $context['json_decode_recursion_depth']; - $options = $context['json_decode_options']; + $options = $context['json_decode_options']; if (version_compare(PHP_VERSION, '5.4.0') >= 0) { $decodedData = json_decode($data, $associative, $recursionDepth, $options); diff --git a/src/Symfony/Component/Serializer/Serializer.php b/src/Symfony/Component/Serializer/Serializer.php index 73ae9fa474..9f44181caa 100644 --- a/src/Symfony/Component/Serializer/Serializer.php +++ b/src/Symfony/Component/Serializer/Serializer.php @@ -39,8 +39,8 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz { protected $encoder; protected $decoder; - protected $normalizers = array(); - protected $normalizerCache = array(); + protected $normalizers = array(); + protected $normalizerCache = array(); protected $denormalizerCache = array(); public function __construct(array $normalizers = array(), array $encoders = array()) diff --git a/src/Symfony/Component/Templating/PhpEngine.php b/src/Symfony/Component/Templating/PhpEngine.php index b4b23fd36d..75a581e353 100644 --- a/src/Symfony/Component/Templating/PhpEngine.php +++ b/src/Symfony/Component/Templating/PhpEngine.php @@ -54,12 +54,12 @@ class PhpEngine implements EngineInterface, \ArrayAccess */ public function __construct(TemplateNameParserInterface $parser, LoaderInterface $loader, array $helpers = array()) { - $this->parser = $parser; - $this->loader = $loader; + $this->parser = $parser; + $this->loader = $loader; $this->parents = array(); - $this->stack = array(); + $this->stack = array(); $this->charset = 'UTF-8'; - $this->cache = array(); + $this->cache = array(); $this->globals = array(); $this->setHelpers($helpers); diff --git a/src/Symfony/Component/Templating/TemplateReference.php b/src/Symfony/Component/Templating/TemplateReference.php index 585bd7a2ad..b7b8ab761d 100644 --- a/src/Symfony/Component/Templating/TemplateReference.php +++ b/src/Symfony/Component/Templating/TemplateReference.php @@ -25,7 +25,7 @@ class TemplateReference implements TemplateReferenceInterface public function __construct($name = null, $engine = null) { $this->parameters = array( - 'name' => $name, + 'name' => $name, 'engine' => $engine, ); } diff --git a/src/Symfony/Component/Translation/Catalogue/DiffOperation.php b/src/Symfony/Component/Translation/Catalogue/DiffOperation.php index 1672d121da..ac3d09b68b 100644 --- a/src/Symfony/Component/Translation/Catalogue/DiffOperation.php +++ b/src/Symfony/Component/Translation/Catalogue/DiffOperation.php @@ -24,8 +24,8 @@ class DiffOperation extends AbstractOperation protected function processDomain($domain) { $this->messages[$domain] = array( - 'all' => array(), - 'new' => array(), + 'all' => array(), + 'new' => array(), 'obsolete' => array(), ); diff --git a/src/Symfony/Component/Translation/Catalogue/MergeOperation.php b/src/Symfony/Component/Translation/Catalogue/MergeOperation.php index 0052363efe..83ccfb14ff 100644 --- a/src/Symfony/Component/Translation/Catalogue/MergeOperation.php +++ b/src/Symfony/Component/Translation/Catalogue/MergeOperation.php @@ -24,8 +24,8 @@ class MergeOperation extends AbstractOperation protected function processDomain($domain) { $this->messages[$domain] = array( - 'all' => array(), - 'new' => array(), + 'all' => array(), + 'new' => array(), 'obsolete' => array(), ); diff --git a/src/Symfony/Component/Translation/Dumper/MoFileDumper.php b/src/Symfony/Component/Translation/Dumper/MoFileDumper.php index 26096d3552..f8dc6ac395 100644 --- a/src/Symfony/Component/Translation/Dumper/MoFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/MoFileDumper.php @@ -38,16 +38,16 @@ class MoFileDumper extends FileDumper } $header = array( - 'magicNumber' => MoFileLoader::MO_LITTLE_ENDIAN_MAGIC, - 'formatRevision' => 0, - 'count' => $size, - 'offsetId' => MoFileLoader::MO_HEADER_SIZE, + 'magicNumber' => MoFileLoader::MO_LITTLE_ENDIAN_MAGIC, + 'formatRevision' => 0, + 'count' => $size, + 'offsetId' => MoFileLoader::MO_HEADER_SIZE, 'offsetTranslated' => MoFileLoader::MO_HEADER_SIZE + (8 * $size), - 'sizeHashes' => 0, - 'offsetHashes' => MoFileLoader::MO_HEADER_SIZE + (16 * $size), + 'sizeHashes' => 0, + 'offsetHashes' => MoFileLoader::MO_HEADER_SIZE + (16 * $size), ); - $sourcesSize = strlen($sources); + $sourcesSize = strlen($sources); $sourcesStart = $header['offsetHashes'] + 1; foreach ($offsets as $offset) { diff --git a/src/Symfony/Component/Translation/Loader/CsvFileLoader.php b/src/Symfony/Component/Translation/Loader/CsvFileLoader.php index f7f901236c..a5f590dba4 100644 --- a/src/Symfony/Component/Translation/Loader/CsvFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/CsvFileLoader.php @@ -26,7 +26,7 @@ class CsvFileLoader extends ArrayLoader implements LoaderInterface { private $delimiter = ';'; private $enclosure = '"'; - private $escape = '\\'; + private $escape = '\\'; /** * {@inheritdoc} @@ -87,6 +87,6 @@ class CsvFileLoader extends ArrayLoader implements LoaderInterface { $this->delimiter = $delimiter; $this->enclosure = $enclosure; - $this->escape = $escape; + $this->escape = $escape; } } diff --git a/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd b/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd index 8fcb991a00..a46162a7a7 100644 --- a/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd +++ b/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd @@ -2,7 +2,7 @@ diff --git a/src/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php b/src/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php index 5eddb56968..93278cc99f 100644 --- a/src/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php +++ b/src/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php @@ -20,8 +20,8 @@ class XliffFileDumperTest extends \PHPUnit_Framework_TestCase { $catalogue = new MessageCatalogue('en'); $catalogue->add(array( - 'foo' => 'bar', - 'key' => '', + 'foo' => 'bar', + 'key' => '', 'key.with.cdata' => ' & ', )); diff --git a/src/Symfony/Component/Validator/Constraints/File.php b/src/Symfony/Component/Validator/Constraints/File.php index 80527171ec..721644038f 100644 --- a/src/Symfony/Component/Validator/Constraints/File.php +++ b/src/Symfony/Component/Validator/Constraints/File.php @@ -30,12 +30,12 @@ class File extends Constraint public $maxSizeMessage = 'The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.'; public $mimeTypesMessage = 'The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.'; - public $uploadIniSizeErrorMessage = 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.'; - public $uploadFormSizeErrorMessage = 'The file is too large.'; - public $uploadPartialErrorMessage = 'The file was only partially uploaded.'; - public $uploadNoFileErrorMessage = 'No file was uploaded.'; - public $uploadNoTmpDirErrorMessage = 'No temporary folder was configured in php.ini.'; + public $uploadIniSizeErrorMessage = 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.'; + public $uploadFormSizeErrorMessage = 'The file is too large.'; + public $uploadPartialErrorMessage = 'The file was only partially uploaded.'; + public $uploadNoFileErrorMessage = 'No file was uploaded.'; + public $uploadNoTmpDirErrorMessage = 'No temporary folder was configured in php.ini.'; public $uploadCantWriteErrorMessage = 'Cannot write temporary file to disk.'; public $uploadExtensionErrorMessage = 'A PHP extension caused the upload to fail.'; - public $uploadErrorMessage = 'The file could not be uploaded.'; + public $uploadErrorMessage = 'The file could not be uploaded.'; } diff --git a/src/Symfony/Component/Validator/Constraints/ImageValidator.php b/src/Symfony/Component/Validator/Constraints/ImageValidator.php index 1671565762..a00cff1f9e 100644 --- a/src/Symfony/Component/Validator/Constraints/ImageValidator.php +++ b/src/Symfony/Component/Validator/Constraints/ImageValidator.php @@ -49,7 +49,7 @@ class ImageValidator extends FileValidator return; } - $width = $size[0]; + $width = $size[0]; $height = $size[1]; if ($constraint->minWidth) { @@ -59,7 +59,7 @@ class ImageValidator extends FileValidator if ($width < $constraint->minWidth) { $this->context->addViolation($constraint->minWidthMessage, array( - '{{ width }}' => $width, + '{{ width }}' => $width, '{{ min_width }}' => $constraint->minWidth, )); @@ -74,7 +74,7 @@ class ImageValidator extends FileValidator if ($width > $constraint->maxWidth) { $this->context->addViolation($constraint->maxWidthMessage, array( - '{{ width }}' => $width, + '{{ width }}' => $width, '{{ max_width }}' => $constraint->maxWidth, )); @@ -89,7 +89,7 @@ class ImageValidator extends FileValidator if ($height < $constraint->minHeight) { $this->context->addViolation($constraint->minHeightMessage, array( - '{{ height }}' => $height, + '{{ height }}' => $height, '{{ min_height }}' => $constraint->minHeight, )); @@ -104,7 +104,7 @@ class ImageValidator extends FileValidator if ($height > $constraint->maxHeight) { $this->context->addViolation($constraint->maxHeightMessage, array( - '{{ height }}' => $height, + '{{ height }}' => $height, '{{ max_height }}' => $constraint->maxHeight, )); } diff --git a/src/Symfony/Component/Validator/Constraints/Regex.php b/src/Symfony/Component/Validator/Constraints/Regex.php index aa4babba68..1285de9601 100644 --- a/src/Symfony/Component/Validator/Constraints/Regex.php +++ b/src/Symfony/Component/Validator/Constraints/Regex.php @@ -84,9 +84,9 @@ class Regex extends Constraint if (preg_match('/^(.)(\^?)(.*?)(\$?)\1$/', $this->pattern, $matches)) { $delimiter = $matches[1]; - $start = empty($matches[2]) ? '.*' : ''; - $pattern = $matches[3]; - $end = empty($matches[4]) ? '.*' : ''; + $start = empty($matches[2]) ? '.*' : ''; + $pattern = $matches[3]; + $end = empty($matches[4]) ? '.*' : ''; // Unescape the delimiter in pattern $pattern = str_replace('\\'.$delimiter, $delimiter, $pattern); diff --git a/src/Symfony/Component/Validator/Constraints/TypeValidator.php b/src/Symfony/Component/Validator/Constraints/TypeValidator.php index 237546a5b9..b89b5cba1d 100644 --- a/src/Symfony/Component/Validator/Constraints/TypeValidator.php +++ b/src/Symfony/Component/Validator/Constraints/TypeValidator.php @@ -45,7 +45,7 @@ class TypeValidator extends ConstraintValidator $this->context->addViolation($constraint->message, array( '{{ value }}' => $this->formatValue($value), - '{{ type }}' => $constraint->type, + '{{ type }}' => $constraint->type, )); } } diff --git a/src/Symfony/Component/Validator/README.md b/src/Symfony/Component/Validator/README.md index 9bec225bee..2e2586938b 100644 --- a/src/Symfony/Component/Validator/README.md +++ b/src/Symfony/Component/Validator/README.md @@ -37,12 +37,12 @@ $validator = Validation::createValidator(); $constraint = new Assert\Collection(array( 'name' => new Assert\Collection(array( 'first_name' => new Assert\Length(array('min' => 101)), - 'last_name' => new Assert\Length(array('min' => 1)), + 'last_name' => new Assert\Length(array('min' => 1)), )), - 'email' => new Assert\Email(), - 'simple' => new Assert\Length(array('min' => 102)), - 'gender' => new Assert\Choice(array(3, 4)), - 'file' => new Assert\File(), + 'email' => new Assert\Email(), + 'simple' => new Assert\Length(array('min' => 102)), + 'gender' => new Assert\Choice(array(3, 4)), + 'file' => new Assert\File(), 'password' => new Assert\Length(array('min' => 60)), )); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php index 19bbe3c479..4df3f7072d 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php @@ -156,8 +156,8 @@ abstract class FileValidatorTest extends AbstractConstraintValidatorTest fclose($this->file); $constraint = new File(array( - 'maxSize' => $limit, - 'maxSizeMessage' => 'myMessage', + 'maxSize' => $limit, + 'maxSizeMessage' => 'myMessage', )); $this->validator->validate($this->getFile($this->path), $constraint); @@ -205,8 +205,8 @@ abstract class FileValidatorTest extends AbstractConstraintValidatorTest fclose($this->file); $constraint = new File(array( - 'maxSize' => $limit, - 'maxSizeMessage' => 'myMessage', + 'maxSize' => $limit, + 'maxSizeMessage' => 'myMessage', )); $this->validator->validate($this->getFile($this->path), $constraint); diff --git a/src/Symfony/Component/Yaml/Escaper.php b/src/Symfony/Component/Yaml/Escaper.php index 7f6ec2bef2..dc9705f4cf 100644 --- a/src/Symfony/Component/Yaml/Escaper.php +++ b/src/Symfony/Component/Yaml/Escaper.php @@ -32,7 +32,7 @@ class Escaper "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9",); - private static $escaped = array('\\\\', '\\"', '\\\\', '\\"', + private static $escaped = array('\\\\', '\\"', '\\\\', '\\"', "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a", "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f", "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", diff --git a/src/Symfony/Component/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index 910db804cd..4b9b77a54d 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -22,11 +22,11 @@ class Parser { const FOLDED_SCALAR_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; - private $offset = 0; - private $lines = array(); - private $currentLineNb = -1; - private $currentLine = ''; - private $refs = array(); + private $offset = 0; + private $lines = array(); + private $currentLineNb = -1; + private $currentLine = ''; + private $refs = array(); /** * Constructor diff --git a/src/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml b/src/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml index 1e59f3bf98..f8f002eb41 100644 --- a/src/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml +++ b/src/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml @@ -463,9 +463,9 @@ yaml: | 0.278 Batting Average php: | array( - 'name' => 'Mark McGwire', + 'name' => 'Mark McGwire', 'accomplishment' => "Mark set a major league home run record in 1998.\n", - 'stats' => "65 Home Runs\n0.278 Batting Average\n" + 'stats' => "65 Home Runs\n0.278 Batting Average\n" ) --- test: Quoted scalars diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php index e5492f846f..d869b52407 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -577,7 +577,7 @@ EOF public function testNestedFoldedStringBlockWithComments() { $this->assertEquals(array(array( - 'title' => 'some title', + 'title' => 'some title', 'content' => <<