From d100ffaf761b46acdb2440c04602378b87b0d610 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 9 Jul 2012 14:50:58 +0200 Subject: [PATCH] fixed CS --- .../Form/ChoiceList/EntityLoaderInterface.php | 4 +- .../MergeDoctrineCollectionListener.php | 2 +- .../Bridge/Doctrine/RegistryInterface.php | 14 ++--- .../Doctrine/Tests/DoctrineOrmTestCase.php | 2 +- .../Tests/Fixtures/SingleIdentEntity.php | 2 +- .../Tests/Form/PropelTypeGuesserTest.php | 2 +- .../Extension/FormExtensionDivLayoutTest.php | 16 +++--- .../FormExtensionTableLayoutTest.php | 12 ++-- .../CacheWarmer/TemplateFinderInterface.php | 3 +- .../Compiler/CompilerDebugDumpPass.php | 2 +- .../FrameworkExtension.php | 1 - .../EventListener/SessionListener.php | 2 +- .../EventListener/TestSessionListener.php | 4 +- .../views/FormTable/form_errors.html.php | 2 +- .../views/FormTable/hidden_row.html.php | 1 - .../Templating/EngineInterface.php | 2 +- .../Templating/Helper/CodeHelper.php | 2 +- .../FrameworkBundle/Test/WebTestCase.php | 14 ++--- .../Tests/CacheWarmer/TemplateFinderTest.php | 1 - .../Controller/RedirectControllerTest.php | 1 - .../RegisterKernelListenersPassTest.php | 2 +- .../Fixtures/php/deprecated_merge_full.php | 1 - .../Fixtures/php/deprecated_merge_partial.php | 1 - .../TestBundle/Resources/config/routing.yml | 1 - .../Tests/Functional/WebTestCase.php | 6 +- .../Tests/Functional/app/Session/config.yml | 1 - .../FrameworkBundle/Tests/HttpKernelTest.php | 2 +- .../Templating/Helper/CodeHelperTest.php | 2 +- .../Helper/FormHelperDivLayoutTest.php | 4 +- .../DependencyInjection/MainConfiguration.php | 2 +- .../Security/Factory/AbstractFactory.php | 2 +- .../Factory/SecurityFactoryInterface.php | 8 +-- .../UserProviderFactoryInterface.php | 6 +- .../DependencyInjection/SecurityExtension.php | 1 - .../Tests/Functional/WebTestCase.php | 6 +- .../views/Profiler/toolbar_style.html.twig | 2 +- .../WebProfilerExtensionTest.php | 2 +- src/Symfony/Component/BrowserKit/Cookie.php | 2 +- .../ClassLoader/ClassCollectionLoader.php | 18 +++--- .../ClassLoader/ClassMapGenerator.php | 6 +- .../ClassLoader/DebugClassLoader.php | 2 +- .../ClassLoader/DebugUniversalClassLoader.php | 2 +- .../Tests/Fixtures/php5.4/traits.php | 16 +++--- .../Component/Config/Definition/ArrayNode.php | 1 - .../Component/Config/Definition/BaseNode.php | 6 +- .../Definition/Builder/EnumNodeDefinition.php | 44 +++++++-------- .../Config/Definition/Builder/ExprBuilder.php | 4 +- .../Builder/ParentNodeDefinitionInterface.php | 6 +- .../Definition/ConfigurationInterface.php | 2 +- .../Component/Config/Definition/EnumNode.php | 2 +- .../Config/Definition/NodeInterface.php | 16 +++--- .../Component/Config/Definition/Processor.php | 4 +- .../Definition/PrototypeNodeInterface.php | 2 +- .../Component/Config/FileLocatorInterface.php | 2 +- .../Component/Config/Loader/FileLoader.php | 2 +- .../Config/Loader/LoaderInterface.php | 8 +-- .../Config/Loader/LoaderResolverInterface.php | 2 +- .../Config/Resource/ResourceInterface.php | 6 +- .../Tests/Definition/BooleanNodeTest.php | 1 - .../Builder/EnumNodeDefinitionTest.php | 2 +- .../Definition/Builder/ExprBuilderTest.php | 5 +- .../Config/Tests/Definition/EnumNodeTest.php | 2 +- src/Symfony/Component/Console/Application.php | 2 +- .../Formatter/OutputFormatterInterface.php | 12 ++-- .../Formatter/OutputFormatterStyle.php | 6 +- .../OutputFormatterStyleInterface.php | 12 ++-- .../Console/Helper/HelperInterface.php | 6 +- .../Console/Input/InputInterface.php | 30 +++++----- .../Console/Output/OutputInterface.php | 16 +++--- .../Console/Tests/ApplicationTest.php | 4 +- .../Console/Tests/Command/CommandTest.php | 4 +- .../Tests/Input/InputDefinitionTest.php | 5 +- .../Component/CssSelector/CssSelector.php | 2 +- .../CssSelector/Node/CombinedSelectorNode.php | 2 +- .../CssSelector/Node/FunctionNode.php | 2 +- .../CssSelector/Node/NodeInterface.php | 4 +- .../Component/CssSelector/Node/PseudoNode.php | 2 +- .../Component/CssSelector/XPathExpr.php | 2 +- .../Compiler/CompilerPassInterface.php | 2 +- .../Compiler/LoggingFormatter.php | 1 - .../Compiler/RepeatablePassInterface.php | 2 +- .../DependencyInjection/Container.php | 4 +- .../ContainerAwareInterface.php | 2 +- .../DependencyInjection/ContainerBuilder.php | 2 +- .../ContainerInterface.php | 22 ++++---- .../Dumper/DumperInterface.php | 2 +- .../DependencyInjection/Dumper/XmlDumper.php | 2 +- .../ConfigurationExtensionInterface.php | 2 +- .../Extension/ExtensionInterface.php | 8 +-- .../IntrospectableContainerInterface.php | 2 +- .../Loader/XmlFileLoader.php | 2 +- .../ParameterBag/ParameterBagInterface.php | 20 +++---- .../DependencyInjection/ScopeInterface.php | 4 +- .../DependencyInjection/SimpleXMLElement.php | 2 +- .../TaggedContainerInterface.php | 2 +- .../Tests/ContainerBuilderTest.php | 1 - .../Tests/CrossCheckTest.php | 4 +- .../Tests/Dumper/GraphvizDumperTest.php | 4 +- .../Tests/Dumper/PhpDumperTest.php | 4 +- .../Tests/Dumper/XmlDumperTest.php | 4 +- .../Tests/Dumper/YamlDumperTest.php | 4 +- .../Tests/Fixtures/includes/classes.php | 6 +- .../Tests/Fixtures/includes/foo.php | 2 +- .../Tests/Loader/IniFileLoaderTest.php | 4 +- .../Tests/Loader/XmlFileLoaderTest.php | 4 +- .../Tests/Loader/YamlFileLoaderTest.php | 4 +- src/Symfony/Component/DomCrawler/Crawler.php | 2 +- src/Symfony/Component/DomCrawler/Form.php | 2 +- .../TraceableEventDispatcherInterface.php | 4 +- .../EventDispatcherInterface.php | 14 ++--- .../EventSubscriberInterface.php | 2 +- .../ContainerAwareEventDispatcherTest.php | 6 +- .../EventDispatcher/Tests/EventTest.php | 1 - src/Symfony/Component/Finder/Finder.php | 6 +- src/Symfony/Component/Finder/Glob.php | 2 +- .../Iterator/MultiplePcreFilterIterator.php | 1 - .../Component/Finder/Tests/FinderTest.php | 5 +- .../Tests/Iterator/RealIteratorTestCase.php | 6 +- .../Component/Form/DataMapperInterface.php | 4 +- .../Form/DataTransformerInterface.php | 4 +- .../Extension/Core/ChoiceList/ChoiceList.php | 2 +- .../Core/ChoiceList/ChoiceListInterface.php | 16 +++--- .../Core/ChoiceList/SimpleChoiceList.php | 1 - .../DateTimeToLocalizedStringTransformer.php | 1 + .../FixCheckboxInputListener.php | 2 +- .../EventListener/FixRadioInputListener.php | 2 +- .../EventListener/FixUrlProtocolListener.php | 2 +- .../EventListener/MergeCollectionListener.php | 2 +- .../Core/EventListener/ResizeFormListener.php | 2 +- .../Core/EventListener/TrimListener.php | 2 +- .../Form/Extension/Core/Type/FormType.php | 1 - .../Form/Extension/Core/Type/MoneyType.php | 2 +- .../Form/Extension/Core/Type/PasswordType.php | 1 - .../Form/Extension/Core/Type/TimezoneType.php | 4 +- .../CsrfProvider/CsrfProviderInterface.php | 4 +- .../EventListener/CsrfValidationListener.php | 2 +- .../EventListener/ValidationListener.php | 2 +- .../Validator/ViolationMapper/MappingRule.php | 1 - .../ViolationMapperInterface.php | 2 +- .../ViolationMapper/ViolationPath.php | 2 - .../ViolationMapper/ViolationPathIterator.php | 1 - src/Symfony/Component/Form/Form.php | 1 - src/Symfony/Component/Form/FormBuilder.php | 1 - .../Component/Form/FormBuilderInterface.php | 22 ++++---- src/Symfony/Component/Form/FormConfig.php | 4 +- .../Form/FormConfigEditorInterface.php | 42 +++++++------- .../Component/Form/FormConfigInterface.php | 48 ++++++++-------- .../Component/Form/FormExtensionInterface.php | 10 ++-- .../Component/Form/FormFactoryInterface.php | 18 +++--- src/Symfony/Component/Form/FormInterface.php | 56 +++++++++---------- .../Form/FormTypeExtensionInterface.php | 10 ++-- .../Form/FormTypeGuesserInterface.php | 10 ++-- .../Component/Form/FormTypeInterface.php | 18 +++--- .../Component/Form/FormValidatorInterface.php | 2 +- .../Component/Form/FormViewInterface.php | 32 +++++------ src/Symfony/Component/Form/Guess/Guess.php | 2 +- .../Component/Form/Tests/AbstractFormTest.php | 1 - .../Form/Tests/AbstractLayoutTest.php | 1 - .../Component/Form/Tests/CompoundFormTest.php | 6 -- .../DataMapper/PropertyPathMapperTest.php | 1 - .../DateTimeToArrayTransformerTest.php | 12 ++-- .../MoneyToLocalizedStringTransformerTest.php | 1 - .../MergeCollectionListenerTest.php | 1 - .../Extension/Core/Type/ChoiceTypeTest.php | 1 - .../Extension/Core/Type/DateTimeTypeTest.php | 14 ++--- .../Extension/Core/Type/DateTypeTest.php | 1 - .../Extension/Core/Type/PasswordTypeTest.php | 1 - .../Extension/Core/Type/RepeatedTypeTest.php | 1 - .../Extension/Core/Type/TimeTypeTest.php | 12 ++-- .../Constraints/FormValidatorTest.php | 1 - .../EventListener/ValidationListenerTest.php | 3 - .../ViolationMapper/ViolationMapperTest.php | 1 - .../ViolationMapper/ViolationPathTest.php | 1 - .../Component/Form/Tests/SimpleFormTest.php | 4 -- .../Component/Form/UnmodifiableFormConfig.php | 3 +- src/Symfony/Component/Form/Util/FormUtil.php | 10 ++-- .../Form/Util/PropertyPathInterface.php | 16 +++--- .../Util/PropertyPathIteratorInterface.php | 4 +- .../File/MimeType/ExtensionGuesser.php | 4 +- .../MimeType/ExtensionGuesserInterface.php | 2 +- .../MimeType/FileBinaryMimeTypeGuesser.php | 2 +- .../File/MimeType/FileinfoMimeTypeGuesser.php | 2 +- .../MimeType/MimeTypeExtensionGuesser.php | 2 +- .../File/MimeType/MimeTypeGuesser.php | 4 +- .../MimeType/MimeTypeGuesserInterface.php | 2 +- .../HttpFoundation/File/UploadedFile.php | 2 +- .../Component/HttpFoundation/FileBag.php | 2 +- .../Component/HttpFoundation/JsonResponse.php | 2 +- .../HttpFoundation/RedirectResponse.php | 2 +- .../Component/HttpFoundation/Request.php | 17 +++--- .../RequestMatcherInterface.php | 2 +- .../stubs/SessionHandlerInterface.php | 12 ++-- .../Component/HttpFoundation/Response.php | 4 +- .../Attribute/AttributeBagInterface.php | 12 ++-- .../Session/Flash/AutoExpireFlashBag.php | 4 +- .../Session/Flash/FlashBagInterface.php | 18 +++--- .../Session/SessionBagInterface.php | 8 +-- .../Session/SessionInterface.php | 38 ++++++------- .../Storage/Proxy/SessionHandlerProxy.php | 2 +- .../Storage/SessionStorageInterface.php | 24 ++++---- .../Tests/File/UploadedFileTest.php | 2 - .../HttpFoundation/Tests/ParameterBagTest.php | 1 - .../Tests/RequestMatcherTest.php | 2 - .../HttpFoundation/Tests/RequestTest.php | 1 - .../Handler/NullSessionHandlerTest.php | 1 - .../Storage/Handler/PdoSessionHandlerTest.php | 1 - .../HttpKernel/Bundle/BundleInterface.php | 16 +++--- .../CacheClearer/CacheClearerInterface.php | 2 +- .../CacheWarmer/CacheWarmerInterface.php | 2 +- .../CacheWarmer/WarmableInterface.php | 2 +- .../ControllerResolverInterface.php | 4 +- .../DataCollector/DataCollector.php | 1 - .../DataCollector/DataCollectorInterface.php | 4 +- .../HttpKernel/Debug/ErrorHandler.php | 2 +- .../HttpKernel/Debug/ExceptionHandler.php | 2 +- .../ConfigurableExtension.php | 2 +- .../DependencyInjection/Extension.php | 2 +- .../HttpKernel/EventListener/EsiListener.php | 2 +- .../EventListener/ExceptionListener.php | 2 +- .../EventListener/LocaleListener.php | 2 +- .../EventListener/ProfilerListener.php | 2 +- .../EventListener/ResponseListener.php | 2 +- .../EventListener/RouterListener.php | 3 +- .../StreamedResponseListener.php | 2 +- .../HttpKernel/Exception/FlattenException.php | 2 +- .../Exception/HttpExceptionInterface.php | 4 +- .../EsiResponseCacheStrategyInterface.php | 4 +- .../HttpKernel/HttpCache/StoreInterface.php | 14 ++--- .../HttpKernel/HttpKernelInterface.php | 2 +- src/Symfony/Component/HttpKernel/Kernel.php | 2 +- .../Component/HttpKernel/KernelInterface.php | 34 +++++------ .../HttpKernel/Log/DebugLoggerInterface.php | 4 +- .../HttpKernel/Log/LoggerInterface.php | 16 +++--- .../Profiler/PdoProfilerStorage.php | 2 +- .../Profiler/ProfilerStorageInterface.php | 8 +-- .../Profiler/SqliteProfilerStorage.php | 1 - .../HttpKernel/TerminableInterface.php | 2 +- .../Controller/ControllerResolverTest.php | 2 +- ...ainerAwareTraceableEventDispatcherTest.php | 4 +- .../HttpKernel/Tests/Debug/StopwatchTest.php | 1 - .../Tests/Fixtures/TestEventDispatcher.php | 4 +- .../Tests/HttpCache/HttpCacheTestCase.php | 2 +- .../HttpKernel/Tests/HttpKernelTest.php | 2 +- .../Profiler/FileProfilerStorageTest.php | 4 +- .../Profiler/MongoDbProfilerStorageTest.php | 4 +- src/Symfony/Component/Locale/Locale.php | 18 +++--- .../Locale/Resources/data/update-data.php | 1 - .../Stub/DateFormat/MonthTransformer.php | 9 ++- .../Stub/DateFormat/TimeZoneTransformer.php | 2 +- .../Component/Locale/Stub/StubCollator.php | 2 +- .../Component/Locale/Stub/StubIntl.php | 10 ++-- .../Locale/Stub/StubIntlDateFormatter.php | 2 +- .../Component/Locale/Stub/StubLocale.php | 54 +++++++++--------- .../Locale/Stub/StubNumberFormatter.php | 14 ++--- .../Tests/Stub/StubNumberFormatterTest.php | 1 - .../Component/OptionsResolver/Options.php | 2 +- .../OptionsResolverInterface.php | 24 ++++---- .../OptionsResolver/Tests/OptionsTest.php | 1 - src/Symfony/Component/Process/Process.php | 2 +- .../Dumper/GeneratorDumperInterface.php | 4 +- .../Generator/UrlGeneratorInterface.php | 2 +- .../Matcher/Dumper/ApacheMatcherDumper.php | 3 +- .../Matcher/Dumper/MatcherDumperInterface.php | 4 +- .../RedirectableUrlMatcherInterface.php | 2 +- .../Matcher/RequestMatcherInterface.php | 2 +- .../Component/Routing/Matcher/UrlMatcher.php | 4 +- .../Routing/Matcher/UrlMatcherInterface.php | 2 +- .../Routing/RequestContextAwareInterface.php | 4 +- src/Symfony/Component/Routing/Route.php | 2 +- .../Routing/RouteCompilerInterface.php | 2 +- .../Component/Routing/RouterInterface.php | 2 +- .../Routing/Tests/Annotation/RouteTest.php | 1 - .../Routing/Tests/Fixtures/validpattern.yml | 1 - .../Loader/AbstractAnnotationLoaderTest.php | 1 - .../Tests/Loader/PhpFileLoaderTest.php | 1 - .../Tests/Matcher/ApacheUrlMatcherTest.php | 1 - .../Dumper/ApacheMatcherDumperTest.php | 4 +- .../Matcher/Dumper/PhpMatcherDumperTest.php | 1 - .../Security/Acl/Dbal/AclProvider.php | 2 +- .../Component/Security/Acl/Domain/Acl.php | 1 - .../Security/Acl/Domain/ObjectIdentity.php | 2 +- .../Acl/Domain/UserSecurityIdentity.php | 4 +- .../Security/Acl/Model/AclCacheInterface.php | 12 ++-- .../Security/Acl/Model/AclInterface.php | 20 +++---- .../Acl/Model/AclProviderInterface.php | 6 +- .../Acl/Model/AuditLoggerInterface.php | 2 +- .../Acl/Model/AuditableAclInterface.php | 8 +-- .../Acl/Model/AuditableEntryInterface.php | 4 +- .../Acl/Model/DomainObjectInterface.php | 2 +- .../Security/Acl/Model/EntryInterface.php | 12 ++-- .../Acl/Model/FieldEntryInterface.php | 2 +- .../Acl/Model/MutableAclInterface.php | 30 +++++----- .../Acl/Model/MutableAclProviderInterface.php | 6 +- .../Acl/Model/ObjectIdentityInterface.php | 6 +- ...jectIdentityRetrievalStrategyInterface.php | 2 +- .../PermissionGrantingStrategyInterface.php | 4 +- .../Acl/Model/SecurityIdentityInterface.php | 2 +- ...rityIdentityRetrievalStrategyInterface.php | 2 +- .../Security/Acl/Permission/MaskBuilder.php | 2 +- .../Acl/Permission/PermissionMapInterface.php | 4 +- .../Acl/Resources/bin/generateSql.php | 1 - .../AuthenticationManagerInterface.php | 2 +- .../AuthenticationTrustResolverInterface.php | 6 +- .../RememberMe/PersistentTokenInterface.php | 10 ++-- .../RememberMe/TokenProviderInterface.php | 8 +-- .../Authentication/Token/TokenInterface.php | 28 +++++----- .../AccessDecisionManagerInterface.php | 6 +- .../Authorization/Voter/VoterInterface.php | 6 +- .../Security/Core/Encoder/EncoderFactory.php | 2 - .../Core/Encoder/EncoderFactoryInterface.php | 2 +- .../Core/Encoder/PasswordEncoderInterface.php | 4 +- .../Core/Role/RoleHierarchyInterface.php | 2 +- .../Security/Core/Role/RoleInterface.php | 2 +- .../Security/Core/SecurityContext.php | 2 +- .../Core/SecurityContextInterface.php | 6 +- .../Core/User/AdvancedUserInterface.php | 8 +-- .../Security/Core/User/EquatableInterface.php | 2 +- .../Core/User/UserCheckerInterface.php | 4 +- .../Security/Core/User/UserInterface.php | 10 ++-- .../Core/User/UserProviderInterface.php | 6 +- .../Security/Http/AccessMapInterface.php | 2 +- .../AuthenticationFailureHandlerInterface.php | 2 +- .../AuthenticationSuccessHandlerInterface.php | 2 +- .../AccessDeniedHandlerInterface.php | 2 +- .../AuthenticationEntryPointInterface.php | 2 +- .../AbstractAuthenticationListener.php | 2 +- .../AbstractPreAuthenticatedListener.php | 2 +- .../Http/Firewall/ListenerInterface.php | 2 +- .../Security/Http/FirewallMapInterface.php | 2 +- .../Http/Logout/LogoutHandlerInterface.php | 2 +- .../Logout/LogoutSuccessHandlerInterface.php | 2 +- .../RememberMe/AbstractRememberMeServices.php | 8 +-- .../RememberMeServicesInterface.php | 6 +- ...SessionAuthenticationStrategyInterface.php | 2 +- .../SecurityIdentityRetrievalStrategyTest.php | 2 - .../DaoAuthenticationProviderTest.php | 1 - .../Serializer/Encoder/DecoderInterface.php | 4 +- .../Serializer/Encoder/EncoderInterface.php | 4 +- .../Normalizer/DenormalizableInterface.php | 2 +- .../Normalizer/DenormalizerInterface.php | 4 +- .../Normalizer/NormalizableInterface.php | 2 +- .../Normalizer/NormalizerInterface.php | 4 +- .../Component/Serializer/Serializer.php | 8 +-- .../Serializer/SerializerAwareInterface.php | 2 +- .../Serializer/SerializerInterface.php | 4 +- .../Tests/Fixtures/DenormalizableDummy.php | 2 +- .../Templating/Asset/PackageInterface.php | 4 +- .../Templating/DebuggerInterface.php | 2 +- .../Component/Templating/EngineInterface.php | 6 +- .../Templating/Helper/HelperInterface.php | 6 +- .../Templating/Loader/FilesystemLoader.php | 2 +- .../Templating/Loader/LoaderInterface.php | 4 +- .../Templating/StreamingEngineInterface.php | 2 +- .../TemplateNameParserInterface.php | 2 +- .../Templating/TemplateReferenceInterface.php | 10 ++-- .../Tests/Loader/FilesystemLoaderTest.php | 6 +- .../Translation/Dumper/DumperInterface.php | 2 +- .../Translation/Dumper/IcuResFileDumper.php | 2 +- .../Extractor/ExtractorInterface.php | 4 +- .../Component/Translation/Interval.php | 6 +- .../Translation/Loader/LoaderInterface.php | 2 +- .../Translation/MessageCatalogueInterface.php | 28 +++++----- .../Translation/PluralizationRules.php | 6 +- .../Translation/TranslatorInterface.php | 8 +-- .../ConstraintValidatorFactoryInterface.php | 2 +- .../ConstraintValidatorInterface.php | 4 +- .../Component/Validator/Constraints/Ip.php | 2 +- .../Component/Validator/Constraints/Regex.php | 2 +- .../GroupSequenceProviderInterface.php | 2 +- .../Mapping/Cache/CacheInterface.php | 6 +- .../Mapping/ClassMetadataFactoryInterface.php | 2 +- .../Mapping/Loader/LoaderInterface.php | 2 +- .../Mapping/Loader/YamlFileLoader.php | 2 +- .../Validator/ObjectInitializerInterface.php | 2 +- .../Tests/Constraints/AllValidatorTest.php | 2 - .../Constraints/CallbackValidatorTest.php | 1 - .../Tests/Constraints/ChoiceValidatorTest.php | 1 - .../Constraints/CollectionValidatorTest.php | 1 - .../Constraints/NotBlankValidatorTest.php | 1 - .../Tests/Fixtures/ConstraintAValidator.php | 2 +- .../Tests/Mapping/GetterMetadataTest.php | 1 - .../Tests/Mapping/Loader/LoaderChainTest.php | 1 - .../Mapping/Loader/StaticMethodLoaderTest.php | 4 +- .../Tests/Mapping/PropertyMetadataTest.php | 1 - .../Validator/ValidatorContextInterface.php | 6 +- .../Component/Validator/ValidatorFactory.php | 2 +- .../Validator/ValidatorInterface.php | 10 ++-- src/Symfony/Component/Yaml/Escaper.php | 12 ++-- src/Symfony/Component/Yaml/Inline.php | 18 +++--- .../Yaml/Tests/Fixtures/YtsErrorTests.yml | 1 - .../Yaml/Tests/Fixtures/embededPhp.yml | 2 +- src/Symfony/Component/Yaml/Unescaper.php | 2 +- src/Symfony/Component/Yaml/Yaml.php | 8 +-- 393 files changed, 996 insertions(+), 1088 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityLoaderInterface.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityLoaderInterface.php index 3b9fab208e..4f53986368 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityLoaderInterface.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityLoaderInterface.php @@ -23,7 +23,7 @@ interface EntityLoaderInterface * * @return array The entities. */ - function getEntities(); + public function getEntities(); /** * Returns an array of entities matching the given identifiers. @@ -35,5 +35,5 @@ interface EntityLoaderInterface * * @return array The entities. */ - function getEntitiesByIds($identifier, array $values); + public function getEntitiesByIds($identifier, array $values); } diff --git a/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php b/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php index 69a4d3dd89..7b7f58003d 100644 --- a/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php +++ b/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php @@ -26,7 +26,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; */ class MergeDoctrineCollectionListener implements EventSubscriberInterface { - static public function getSubscribedEvents() + public static function getSubscribedEvents() { // Higher priority than core MergeCollectionListener so that this one // is called before diff --git a/src/Symfony/Bridge/Doctrine/RegistryInterface.php b/src/Symfony/Bridge/Doctrine/RegistryInterface.php index f941d2f0ae..dbba073348 100644 --- a/src/Symfony/Bridge/Doctrine/RegistryInterface.php +++ b/src/Symfony/Bridge/Doctrine/RegistryInterface.php @@ -26,7 +26,7 @@ interface RegistryInterface extends ManagerRegistryInterface * * @return string The default entity manager name */ - function getDefaultEntityManagerName(); + public function getDefaultEntityManagerName(); /** * Gets a named entity manager. @@ -35,14 +35,14 @@ interface RegistryInterface extends ManagerRegistryInterface * * @return EntityManager */ - function getEntityManager($name = null); + public function getEntityManager($name = null); /** * Gets an array of all registered entity managers * * @return array An array of EntityManager instances */ - function getEntityManagers(); + public function getEntityManagers(); /** * Resets a named entity manager. @@ -61,7 +61,7 @@ interface RegistryInterface extends ManagerRegistryInterface * * @return EntityManager */ - function resetEntityManager($name = null); + public function resetEntityManager($name = null); /** * Resolves a registered namespace alias to the full namespace. @@ -74,14 +74,14 @@ interface RegistryInterface extends ManagerRegistryInterface * * @see Configuration::getEntityNamespace */ - function getEntityNamespace($alias); + public function getEntityNamespace($alias); /** * Gets all connection names. * * @return array An array of connection names */ - function getEntityManagerNames(); + public function getEntityManagerNames(); /** * Gets the entity manager associated with a given class. @@ -90,5 +90,5 @@ interface RegistryInterface extends ManagerRegistryInterface * * @return EntityManager|null */ - function getEntityManagerForClass($class); + public function getEntityManagerForClass($class); } diff --git a/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php b/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php index 44c42c5b92..005c807b09 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php @@ -35,7 +35,7 @@ abstract class DoctrineOrmTestCase extends \PHPUnit_Framework_TestCase /** * @return EntityManager */ - static public function createTestEntityManager($paths = array()) + public static function createTestEntityManager($paths = array()) { if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) { self::markTestSkipped('This test requires SQLite support in your environment'); diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIdentEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIdentEntity.php index 6eab851746..09ee18a2fc 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIdentEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIdentEntity.php @@ -32,6 +32,6 @@ class SingleIdentEntity public function __toString() { - return (string)$this->name; + return (string) $this->name; } } diff --git a/src/Symfony/Bridge/Propel1/Tests/Form/PropelTypeGuesserTest.php b/src/Symfony/Bridge/Propel1/Tests/Form/PropelTypeGuesserTest.php index f60fc8f989..a9ed9a01a6 100644 --- a/src/Symfony/Bridge/Propel1/Tests/Form/PropelTypeGuesserTest.php +++ b/src/Symfony/Bridge/Propel1/Tests/Form/PropelTypeGuesserTest.php @@ -105,7 +105,7 @@ class PropelTypeGuesserTest extends Propel1TestCase $this->assertEquals($confidence, $value->getConfidence()); } - static public function dataProviderForGuessType() + public static function dataProviderForGuessType() { return array( array('is_active', 'checkbox', Guess::HIGH_CONFIDENCE), diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php index 5b6e4460e8..b460d75ea7 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php @@ -98,32 +98,32 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest protected function renderEnctype(FormView $view) { - return (string)$this->extension->renderEnctype($view); + return (string) $this->extension->renderEnctype($view); } protected function renderLabel(FormView $view, $label = null, array $vars = array()) { - return (string)$this->extension->renderLabel($view, $label, $vars); + return (string) $this->extension->renderLabel($view, $label, $vars); } protected function renderErrors(FormView $view) { - return (string)$this->extension->renderErrors($view); + return (string) $this->extension->renderErrors($view); } protected function renderWidget(FormView $view, array $vars = array()) { - return (string)$this->extension->renderWidget($view, $vars); + return (string) $this->extension->renderWidget($view, $vars); } protected function renderRow(FormView $view, array $vars = array()) { - return (string)$this->extension->renderRow($view, $vars); + return (string) $this->extension->renderRow($view, $vars); } protected function renderRest(FormView $view, array $vars = array()) { - return (string)$this->extension->renderRest($view, $vars); + return (string) $this->extension->renderRest($view, $vars); } protected function setTheme(FormView $view, array $themes) @@ -131,14 +131,14 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest $this->extension->setTheme($view, $themes); } - static public function themeBlockInheritanceProvider() + public static function themeBlockInheritanceProvider() { return array( array(array('theme.html.twig')) ); } - static public function themeInheritanceProvider() + public static function themeInheritanceProvider() { return array( array(array('parent_label.html.twig'), array('child_label.html.twig')) diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php index bfcce48a0b..5034701ccd 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php @@ -68,32 +68,32 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest protected function renderEnctype(FormView $view) { - return (string)$this->extension->renderEnctype($view); + return (string) $this->extension->renderEnctype($view); } protected function renderLabel(FormView $view, $label = null, array $vars = array()) { - return (string)$this->extension->renderLabel($view, $label, $vars); + return (string) $this->extension->renderLabel($view, $label, $vars); } protected function renderErrors(FormView $view) { - return (string)$this->extension->renderErrors($view); + return (string) $this->extension->renderErrors($view); } protected function renderWidget(FormView $view, array $vars = array()) { - return (string)$this->extension->renderWidget($view, $vars); + return (string) $this->extension->renderWidget($view, $vars); } protected function renderRow(FormView $view, array $vars = array()) { - return (string)$this->extension->renderRow($view, $vars); + return (string) $this->extension->renderRow($view, $vars); } protected function renderRest(FormView $view, array $vars = array()) { - return (string)$this->extension->renderRest($view, $vars); + return (string) $this->extension->renderRest($view, $vars); } protected function setTheme(FormView $view, array $themes) diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinderInterface.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinderInterface.php index a2ef3aa1d9..433ed8f548 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinderInterface.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinderInterface.php @@ -11,7 +11,6 @@ namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - /** * Interface for finding all the templates. * @@ -24,5 +23,5 @@ interface TemplateFinderInterface * * @return array An array of templates of type TemplateReferenceInterface */ - function findAllTemplates(); + public function findAllTemplates(); } diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CompilerDebugDumpPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CompilerDebugDumpPass.php index 620edc23b5..ad93d7b419 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CompilerDebugDumpPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CompilerDebugDumpPass.php @@ -24,7 +24,7 @@ class CompilerDebugDumpPass implements CompilerPassInterface $cache->write(implode("\n", $container->getCompiler()->getLog())); } - static public function getCompilerLogFilename(ContainerInterface $container) + public static function getCompilerLogFilename(ContainerInterface $container) { $class = $container->getParameter('kernel.container_class'); diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 9518506d3e..938be74f43 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -11,7 +11,6 @@ namespace Symfony\Bundle\FrameworkBundle\DependencyInjection; -use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\DefinitionDecorator; use Symfony\Component\DependencyInjection\Reference; diff --git a/src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php b/src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php index 87f4c3eccd..f8155a9d68 100644 --- a/src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php +++ b/src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php @@ -52,7 +52,7 @@ class SessionListener implements EventSubscriberInterface $request->setSession($this->container->get('session')); } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( KernelEvents::REQUEST => array('onKernelRequest', 128), diff --git a/src/Symfony/Bundle/FrameworkBundle/EventListener/TestSessionListener.php b/src/Symfony/Bundle/FrameworkBundle/EventListener/TestSessionListener.php index 55fbb75673..9e0617723a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/EventListener/TestSessionListener.php +++ b/src/Symfony/Bundle/FrameworkBundle/EventListener/TestSessionListener.php @@ -49,7 +49,7 @@ class TestSessionListener implements EventSubscriberInterface $session = $this->container->get('session'); $cookies = $event->getRequest()->cookies; - + if ($cookies->has($session->getName())) { $session->setId($cookies->get($session->getName())); } else { @@ -78,7 +78,7 @@ class TestSessionListener implements EventSubscriberInterface } } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( KernelEvents::REQUEST => array('onKernelRequest', 192), diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_errors.html.php b/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_errors.html.php index 154b6e2c02..f1dbfc3486 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_errors.html.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_errors.html.php @@ -48,4 +48,4 @@ - +widget($form) ?> - diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/EngineInterface.php b/src/Symfony/Bundle/FrameworkBundle/Templating/EngineInterface.php index 0b125705ee..edc087e867 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/EngineInterface.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/EngineInterface.php @@ -30,5 +30,5 @@ interface EngineInterface extends BaseEngineInterface * * @return Response A Response instance */ - function renderResponse($view, array $parameters = array(), Response $response = null); + public function renderResponse($view, array $parameters = array(), Response $response = null); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php index 1997df9661..3fdad98481 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php @@ -201,7 +201,7 @@ class CodeHelper extends Helper return 'code'; } - static protected function fixCodeMarkup($line) + protected static function fixCodeMarkup($line) { // ending tag from previous line $opening = strpos($line, 'shutdown(); @@ -56,7 +56,7 @@ abstract class WebTestCase extends \PHPUnit_Framework_TestCase * * @return string The directory where phpunit.xml(.dist) is stored */ - static protected function getPhpUnitXmlDir() + protected static function getPhpUnitXmlDir() { if (!isset($_SERVER['argv']) || false === strpos($_SERVER['argv'][0], 'phpunit')) { throw new \RuntimeException('You must override the WebTestCase::createKernel() method.'); @@ -89,7 +89,7 @@ abstract class WebTestCase extends \PHPUnit_Framework_TestCase * * @return string The value of the phpunit cli configuration option */ - static private function getPhpUnitCliConfigArgument() + private static function getPhpUnitCliConfigArgument() { $dir = null; $reversedArgs = array_reverse($_SERVER['argv']); @@ -114,7 +114,7 @@ abstract class WebTestCase extends \PHPUnit_Framework_TestCase * * @return string The Kernel class name */ - static protected function getKernelClass() + protected static function getKernelClass() { $dir = isset($_SERVER['KERNEL_DIR']) ? $_SERVER['KERNEL_DIR'] : static::getPhpUnitXmlDir(); @@ -145,7 +145,7 @@ abstract class WebTestCase extends \PHPUnit_Framework_TestCase * * @return HttpKernelInterface A HttpKernelInterface instance */ - static protected function createKernel(array $options = array()) + protected static function createKernel(array $options = array()) { if (null === static::$class) { static::$class = static::getKernelClass(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplateFinderTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplateFinderTest.php index 6b066dd6a8..f2e756ab3b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplateFinderTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplateFinderTest.php @@ -16,7 +16,6 @@ use Symfony\Bundle\FrameworkBundle\Templating\TemplateFilenameParser; use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinder; use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\BaseBundle\BaseBundle; - class TemplateFinderTest extends TestCase { public function testFindAllTemplates() diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php index dc19ad925b..b64021e08e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php @@ -68,7 +68,6 @@ class RedirectControllerTest extends TestCase $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); - $container ->expects($this->at(0)) ->method('get') diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/RegisterKernelListenersPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/RegisterKernelListenersPassTest.php index 8e301383f8..670052fe1b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/RegisterKernelListenersPassTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/RegisterKernelListenersPassTest.php @@ -85,5 +85,5 @@ class RegisterKernelListenersPassTest extends \PHPUnit_Framework_TestCase class SubscriberService implements \Symfony\Component\EventDispatcher\EventSubscriberInterface { - static function getSubscribedEvents() {} + public static function getSubscribedEvents() {} } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/deprecated_merge_full.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/deprecated_merge_full.php index 07b07fa552..b7a56d63ff 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/deprecated_merge_full.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/deprecated_merge_full.php @@ -18,4 +18,3 @@ $container->loadFromExtension('framework', array( 'cookie_httponly' => true, ), )); - diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/deprecated_merge_partial.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/deprecated_merge_partial.php index 8706696e58..5d56c1c01e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/deprecated_merge_partial.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/deprecated_merge_partial.php @@ -15,4 +15,3 @@ $container->loadFromExtension('framework', array( 'cookie_httponly' => true, ), )); - diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml index 7462fbfcbd..69a8e6d45a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml @@ -17,4 +17,3 @@ session_setflash: session_showflash: pattern: /session_showflash defaults: { _controller: TestBundle:Session:showFlash} - diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/WebTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/WebTestCase.php index e5bbe87c7d..affbeb93d3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/WebTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/WebTestCase.php @@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\Kernel; class WebTestCase extends BaseWebTestCase { - static public function assertRedirect($response, $location) + public static function assertRedirect($response, $location) { self::assertTrue($response->isRedirect(), 'Response is not a redirect, got status code: '.$response->getStatusCode()); self::assertEquals('http://localhost'.$location, $response->headers->get('Location')); @@ -42,14 +42,14 @@ class WebTestCase extends BaseWebTestCase $fs->remove($dir); } - static protected function getKernelClass() + protected static function getKernelClass() { require_once __DIR__.'/app/AppKernel.php'; return 'Symfony\Bundle\FrameworkBundle\Tests\Functional\AppKernel'; } - static protected function createKernel(array $options = array()) + protected static function createKernel(array $options = array()) { $class = self::getKernelClass(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/config.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/config.yml index 7b67b7d1cb..65dd6c7fa9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/config.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/config.yml @@ -1,3 +1,2 @@ imports: - { resource: ./../config/default.yml } - diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/HttpKernelTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/HttpKernelTest.php index fefb64ada7..3c02f4fe50 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/HttpKernelTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/HttpKernelTest.php @@ -48,7 +48,7 @@ class HttpKernelTest extends \PHPUnit_Framework_TestCase $resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface'); $kernel = new HttpKernel($dispatcher, $container, $resolver); - $controller = function() use($expected) { + $controller = function() use ($expected) { return $expected; }; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/CodeHelperTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/CodeHelperTest.php index 357170d3d8..0d53544df3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/CodeHelperTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/CodeHelperTest.php @@ -17,7 +17,7 @@ class CodeHelperTest extends \PHPUnit_Framework_TestCase { protected static $helper; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$helper = new CodeHelper('txmt://open?url=file://%f&line=%l', '/root', 'UTF-8'); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php index dbb6fa12e8..b4878d4baa 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php @@ -82,14 +82,14 @@ class FormHelperDivLayoutTest extends AbstractDivLayoutTest $this->helper->setTheme($view, $themes); } - static public function themeBlockInheritanceProvider() + public static function themeBlockInheritanceProvider() { return array( array(array('TestBundle:Parent')) ); } - static public function themeInheritanceProvider() + public static function themeInheritanceProvider() { return array( array(array('TestBundle:Parent'), array('TestBundle:Child')) diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php index 9d598ededd..c7b631e07f 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php @@ -277,7 +277,7 @@ class MainConfiguration implements ConfigurationInterface ->ifTrue(function($v) { return true === $v['security'] && isset($v['pattern']) && !isset($v['request_matcher']); }) - ->then(function($firewall) use($abstractFactoryKeys) { + ->then(function($firewall) use ($abstractFactoryKeys) { foreach ($abstractFactoryKeys as $k) { if (!isset($firewall[$k]['check_path'])) { continue; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php index 611b0285c0..c74fb1348a 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php @@ -80,7 +80,7 @@ abstract class AbstractFactory implements SecurityFactoryInterface } } - public final function addOption($name, $default = null) + final public function addOption($name, $default = null) { $this->options[$name] = $default; } diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php index 5ef4c00fff..5e8773b742 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php @@ -21,11 +21,11 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; */ interface SecurityFactoryInterface { - function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint); + public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint); - function getPosition(); + public function getPosition(); - function getKey(); + public function getKey(); - function addConfiguration(NodeDefinition $builder); + public function addConfiguration(NodeDefinition $builder); } diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php index 9f7eaf6277..df250358aa 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php @@ -22,9 +22,9 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; */ interface UserProviderFactoryInterface { - function create(ContainerBuilder $container, $id, $config); + public function create(ContainerBuilder $container, $id, $config); - function getKey(); + public function getKey(); - function addConfiguration(NodeDefinition $builder); + public function addConfiguration(NodeDefinition $builder); } diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php index b856a9191f..4ea9728eca 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php @@ -625,4 +625,3 @@ class SecurityExtension extends Extension return new MainConfiguration($this->factories, $this->userProviderFactories); } } - diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php index 4440a3e033..3c78d10d33 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php @@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\Kernel; class WebTestCase extends BaseWebTestCase { - static public function assertRedirect($response, $location) + public static function assertRedirect($response, $location) { self::assertTrue($response->isRedirect(), 'Response is not a redirect, got status code: '.substr($response, 0, 2000)); self::assertEquals('http://localhost'.$location, $response->headers->get('Location')); @@ -42,14 +42,14 @@ class WebTestCase extends BaseWebTestCase $fs->remove($dir); } - static protected function getKernelClass() + protected static function getKernelClass() { require_once __DIR__.'/app/AppKernel.php'; return 'Symfony\Bundle\SecurityBundle\Tests\Functional\AppKernel'; } - static protected function createKernel(array $options = array()) + protected static function createKernel(array $options = array()) { $class = self::getKernelClass(); diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_style.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_style.html.twig index b44e31245e..dee250b5f2 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_style.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_style.html.twig @@ -55,7 +55,7 @@ .sf-toolbar-block .sf-toolbar-info-piece:last-child { padding-bottom: 0; } - + .sf-toolbar-block .sf-toolbar-info-piece a, .sf-toolbar-block .sf-toolbar-info-piece abbr { color: #2f2f2f; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php index 372040a9f2..48f3cc7059 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php @@ -28,7 +28,7 @@ class WebProfilerExtensionTest extends TestCase */ private $container; - static public function assertSaneContainer(Container $container, $message = '') + public static function assertSaneContainer(Container $container, $message = '') { $errors = array(); foreach ($container->getServiceIds() as $id) { diff --git a/src/Symfony/Component/BrowserKit/Cookie.php b/src/Symfony/Component/BrowserKit/Cookie.php index 16063ee8ed..148767d17b 100644 --- a/src/Symfony/Component/BrowserKit/Cookie.php +++ b/src/Symfony/Component/BrowserKit/Cookie.php @@ -117,7 +117,7 @@ class Cookie * * @api */ - static public function fromString($cookie, $url = null) + public static function fromString($cookie, $url = null) { $parts = explode(';', $cookie); diff --git a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php index b01beb7707..f010e53431 100644 --- a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php +++ b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php @@ -18,8 +18,8 @@ namespace Symfony\Component\ClassLoader; */ class ClassCollectionLoader { - static private $loaded; - static private $seen; + private static $loaded; + private static $seen; /** * Loads a list of classes and caches them in one big file. @@ -33,7 +33,7 @@ class ClassCollectionLoader * * @throws \InvalidArgumentException When class can't be loaded */ - static public function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php') + public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php') { // each $name can only be loaded once per PHP process if (isset(self::$loaded[$name])) { @@ -133,7 +133,7 @@ class ClassCollectionLoader * * @return string Namespaces with brackets */ - static public function fixNamespaceDeclarations($source) + public static function fixNamespaceDeclarations($source) { if (!function_exists('token_get_all')) { return $source; @@ -188,7 +188,7 @@ class ClassCollectionLoader * * @throws \RuntimeException when a cache file cannot be written */ - static private function writeCacheFile($file, $content) + private static function writeCacheFile($file, $content) { $tmpFile = tempnam(dirname($file), basename($file)); if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) { @@ -210,7 +210,7 @@ class ClassCollectionLoader * * @return string The PHP string with the comments removed */ - static private function stripComments($source) + private static function stripComments($source) { if (!function_exists('token_get_all')) { return $source; @@ -240,7 +240,7 @@ class ClassCollectionLoader * * @throws \InvalidArgumentException When a class can't be loaded */ - static private function getOrderedClasses(array $classes) + private static function getOrderedClasses(array $classes) { $map = array(); self::$seen = array(); @@ -257,7 +257,7 @@ class ClassCollectionLoader return $map; } - static private function getClassHierarchy(\ReflectionClass $class) + private static function getClassHierarchy(\ReflectionClass $class) { if (isset(self::$seen[$class->getName()])) { return array(); @@ -294,7 +294,7 @@ class ClassCollectionLoader return $classes; } - static private function getTraits(\ReflectionClass $class) + private static function getTraits(\ReflectionClass $class) { $traits = $class->getTraits(); $classes = array(); diff --git a/src/Symfony/Component/ClassLoader/ClassMapGenerator.php b/src/Symfony/Component/ClassLoader/ClassMapGenerator.php index 91ea9afa59..b0e6580df6 100644 --- a/src/Symfony/Component/ClassLoader/ClassMapGenerator.php +++ b/src/Symfony/Component/ClassLoader/ClassMapGenerator.php @@ -24,7 +24,7 @@ class ClassMapGenerator * @param array|string $dirs Directories or a single path to search in * @param string $file The name of the class map file */ - static public function dump($dirs, $file) + public static function dump($dirs, $file) { $dirs = (array) $dirs; $maps = array(); @@ -43,7 +43,7 @@ class ClassMapGenerator * * @return array A class map array */ - static public function createMap($dir) + public static function createMap($dir) { if (is_string($dir)) { $dir = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir)); @@ -80,7 +80,7 @@ class ClassMapGenerator * * @return array The found classes */ - static private function findClasses($path) + private static function findClasses($path) { $contents = file_get_contents($path); $tokens = token_get_all($contents); diff --git a/src/Symfony/Component/ClassLoader/DebugClassLoader.php b/src/Symfony/Component/ClassLoader/DebugClassLoader.php index da7d289df2..dbfb5ab1e3 100644 --- a/src/Symfony/Component/ClassLoader/DebugClassLoader.php +++ b/src/Symfony/Component/ClassLoader/DebugClassLoader.php @@ -42,7 +42,7 @@ class DebugClassLoader /** * Replaces all autoloaders implementing a findFile method by a DebugClassLoader wrapper. */ - static public function enable() + public static function enable() { if (!is_array($functions = spl_autoload_functions())) { return; diff --git a/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php b/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php index 8cc6747fb2..96c6290fc2 100644 --- a/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php +++ b/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php @@ -21,7 +21,7 @@ class DebugUniversalClassLoader extends UniversalClassLoader /** * Replaces all regular UniversalClassLoader instances by a DebugUniversalClassLoader ones. */ - static public function enable() + public static function enable() { if (!is_array($functions = spl_autoload_functions())) { return; diff --git a/src/Symfony/Component/ClassLoader/Tests/Fixtures/php5.4/traits.php b/src/Symfony/Component/ClassLoader/Tests/Fixtures/php5.4/traits.php index 34257c7120..2d92c378e1 100644 --- a/src/Symfony/Component/ClassLoader/Tests/Fixtures/php5.4/traits.php +++ b/src/Symfony/Component/ClassLoader/Tests/Fixtures/php5.4/traits.php @@ -1,7 +1,7 @@ allowOverwrite) { throw new ForbiddenOverwriteException(sprintf( @@ -245,7 +245,7 @@ abstract class BaseNode implements NodeInterface * * @return mixed The normalized value. */ - public final function normalize($value) + final public function normalize($value) { // run custom normalization closures foreach ($this->normalizationClosures as $closure) { @@ -273,7 +273,7 @@ abstract class BaseNode implements NodeInterface * * @return mixed The finalized value */ - public final function finalize($value) + final public function finalize($value) { $this->validateType($value); diff --git a/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php index ff47958705..6f2864e766 100755 --- a/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php +++ b/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php @@ -12,30 +12,30 @@ use Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition; */ class EnumNodeDefinition extends ScalarNodeDefinition { - private $values; - - public function values(array $values) - { - $values = array_unique($values); - - if (count($values) <= 1) { - throw new \InvalidArgumentException('->values() must be called with at least two distinct values.'); - } - - $this->values = $values; - } + private $values; - /** - * Instantiate a Node - * - * @return EnumNode The node - */ - protected function instantiateNode() + public function values(array $values) + { + $values = array_unique($values); + + if (count($values) <= 1) { + throw new \InvalidArgumentException('->values() must be called with at least two distinct values.'); + } + + $this->values = $values; + } + + /** + * Instantiate a Node + * + * @return EnumNode The node + */ + protected function instantiateNode() { if (null === $this->values) { throw new \RuntimeException('You must call ->values() on enum nodes.'); } - - return new EnumNode($this->name, $this->parent, $this->values); - } -} \ No newline at end of file + + return new EnumNode($this->name, $this->parent, $this->values); + } +} diff --git a/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php b/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php index 28474fd7cf..10d2e00dbb 100644 --- a/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php @@ -214,11 +214,11 @@ class ExprBuilder * * @return array */ - static public function buildExpressions(array $expressions) + public static function buildExpressions(array $expressions) { foreach ($expressions as $k => $expr) { if ($expr instanceof ExprBuilder) { - $expressions[$k] = function($v) use($expr) { + $expressions[$k] = function($v) use ($expr) { return call_user_func($expr->ifPart, $v) ? call_user_func($expr->thenPart, $v) : $v; }; } diff --git a/src/Symfony/Component/Config/Definition/Builder/ParentNodeDefinitionInterface.php b/src/Symfony/Component/Config/Definition/Builder/ParentNodeDefinitionInterface.php index 2d95954239..005c26b7df 100644 --- a/src/Symfony/Component/Config/Definition/Builder/ParentNodeDefinitionInterface.php +++ b/src/Symfony/Component/Config/Definition/Builder/ParentNodeDefinitionInterface.php @@ -18,9 +18,9 @@ namespace Symfony\Component\Config\Definition\Builder; */ interface ParentNodeDefinitionInterface { - function children(); + public function children(); - function append(NodeDefinition $node); + public function append(NodeDefinition $node); - function setBuilder(NodeBuilder $builder); + public function setBuilder(NodeBuilder $builder); } diff --git a/src/Symfony/Component/Config/Definition/ConfigurationInterface.php b/src/Symfony/Component/Config/Definition/ConfigurationInterface.php index dc189e2e21..336cb0088e 100644 --- a/src/Symfony/Component/Config/Definition/ConfigurationInterface.php +++ b/src/Symfony/Component/Config/Definition/ConfigurationInterface.php @@ -23,5 +23,5 @@ interface ConfigurationInterface * * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder */ - function getConfigTreeBuilder(); + public function getConfigTreeBuilder(); } diff --git a/src/Symfony/Component/Config/Definition/EnumNode.php b/src/Symfony/Component/Config/Definition/EnumNode.php index 301dfd7635..9bfb46710c 100755 --- a/src/Symfony/Component/Config/Definition/EnumNode.php +++ b/src/Symfony/Component/Config/Definition/EnumNode.php @@ -47,4 +47,4 @@ class EnumNode extends ScalarNode return $value; } -} \ No newline at end of file +} diff --git a/src/Symfony/Component/Config/Definition/NodeInterface.php b/src/Symfony/Component/Config/Definition/NodeInterface.php index 89c4360253..cdbc0ef096 100644 --- a/src/Symfony/Component/Config/Definition/NodeInterface.php +++ b/src/Symfony/Component/Config/Definition/NodeInterface.php @@ -26,28 +26,28 @@ interface NodeInterface * * @return string The name of the node */ - function getName(); + public function getName(); /** * Returns the path of the node. * * @return string The node path */ - function getPath(); + public function getPath(); /** * Returns true when the node is required. * * @return Boolean If the node is required */ - function isRequired(); + public function isRequired(); /** * Returns true when the node has a default value. * * @return Boolean If the node has a default value */ - function hasDefaultValue(); + public function hasDefaultValue(); /** * Returns the default value of the node. @@ -55,7 +55,7 @@ interface NodeInterface * @return mixed The default value * @throws \RuntimeException if the node has no default value */ - function getDefaultValue(); + public function getDefaultValue(); /** * Normalizes the supplied value. @@ -64,7 +64,7 @@ interface NodeInterface * * @return mixed The normalized value */ - function normalize($value); + public function normalize($value); /** * Merges two values together. @@ -74,7 +74,7 @@ interface NodeInterface * * @return mixed The merged values */ - function merge($leftSide, $rightSide); + public function merge($leftSide, $rightSide); /** * Finalizes a value. @@ -83,5 +83,5 @@ interface NodeInterface * * @return mixed The finalized value */ - function finalize($value); + public function finalize($value); } diff --git a/src/Symfony/Component/Config/Definition/Processor.php b/src/Symfony/Component/Config/Definition/Processor.php index a6c3181118..a40d2c70c1 100644 --- a/src/Symfony/Component/Config/Definition/Processor.php +++ b/src/Symfony/Component/Config/Definition/Processor.php @@ -65,7 +65,7 @@ class Processor * * @return array the config with normalized keys */ - static public function normalizeKeys(array $config) + public static function normalizeKeys(array $config) { foreach ($config as $key => $value) { if (is_array($value)) { @@ -104,7 +104,7 @@ class Processor * * @return array */ - static public function normalizeConfig($config, $key, $plural = null) + public static function normalizeConfig($config, $key, $plural = null) { if (null === $plural) { $plural = $key.'s'; diff --git a/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php b/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php index 8f08c989af..8bbb84d4dc 100644 --- a/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php +++ b/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php @@ -23,5 +23,5 @@ interface PrototypeNodeInterface extends NodeInterface * * @param string $name The name of the node */ - function setName($name); + public function setName($name); } diff --git a/src/Symfony/Component/Config/FileLocatorInterface.php b/src/Symfony/Component/Config/FileLocatorInterface.php index d756b831d6..4ff19b4de9 100644 --- a/src/Symfony/Component/Config/FileLocatorInterface.php +++ b/src/Symfony/Component/Config/FileLocatorInterface.php @@ -27,5 +27,5 @@ interface FileLocatorInterface * * @throws \InvalidArgumentException When file is not found */ - function locate($name, $currentPath = null, $first = true); + public function locate($name, $currentPath = null, $first = true); } diff --git a/src/Symfony/Component/Config/Loader/FileLoader.php b/src/Symfony/Component/Config/Loader/FileLoader.php index 39c36b465f..c4e3cedf28 100644 --- a/src/Symfony/Component/Config/Loader/FileLoader.php +++ b/src/Symfony/Component/Config/Loader/FileLoader.php @@ -22,7 +22,7 @@ use Symfony\Component\Config\Exception\FileLoaderImportCircularReferenceExceptio */ abstract class FileLoader extends Loader { - static protected $loading = array(); + protected static $loading = array(); protected $locator; diff --git a/src/Symfony/Component/Config/Loader/LoaderInterface.php b/src/Symfony/Component/Config/Loader/LoaderInterface.php index 10bfefc10f..d0ac5b8bef 100644 --- a/src/Symfony/Component/Config/Loader/LoaderInterface.php +++ b/src/Symfony/Component/Config/Loader/LoaderInterface.php @@ -24,7 +24,7 @@ interface LoaderInterface * @param mixed $resource The resource * @param string $type The resource type */ - function load($resource, $type = null); + public function load($resource, $type = null); /** * Returns true if this class supports the given resource. @@ -34,20 +34,20 @@ interface LoaderInterface * * @return Boolean true if this class supports the given resource, false otherwise */ - function supports($resource, $type = null); + public function supports($resource, $type = null); /** * Gets the loader resolver. * * @return LoaderResolverInterface A LoaderResolverInterface instance */ - function getResolver(); + public function getResolver(); /** * Sets the loader resolver. * * @param LoaderResolverInterface $resolver A LoaderResolverInterface instance */ - function setResolver(LoaderResolverInterface $resolver); + public function setResolver(LoaderResolverInterface $resolver); } diff --git a/src/Symfony/Component/Config/Loader/LoaderResolverInterface.php b/src/Symfony/Component/Config/Loader/LoaderResolverInterface.php index f660401ef0..57d878152a 100644 --- a/src/Symfony/Component/Config/Loader/LoaderResolverInterface.php +++ b/src/Symfony/Component/Config/Loader/LoaderResolverInterface.php @@ -26,5 +26,5 @@ interface LoaderResolverInterface * * @return LoaderInterface A LoaderInterface instance */ - function resolve($resource, $type = null); + public function resolve($resource, $type = null); } diff --git a/src/Symfony/Component/Config/Resource/ResourceInterface.php b/src/Symfony/Component/Config/Resource/ResourceInterface.php index 024f2e95f9..d624a573b0 100644 --- a/src/Symfony/Component/Config/Resource/ResourceInterface.php +++ b/src/Symfony/Component/Config/Resource/ResourceInterface.php @@ -23,7 +23,7 @@ interface ResourceInterface * * @return string A string representation of the Resource */ - function __toString(); + public function __toString(); /** * Returns true if the resource has not been updated since the given timestamp. @@ -32,12 +32,12 @@ interface ResourceInterface * * @return Boolean true if the resource has not been updated, false otherwise */ - function isFresh($timestamp); + public function isFresh($timestamp); /** * Returns the resource tied to this Resource. * * @return mixed The resource */ - function getResource(); + public function getResource(); } diff --git a/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php index 8369f714d0..ea5fffe73c 100644 --- a/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php @@ -58,4 +58,3 @@ class BooleanNodeTest extends \PHPUnit_Framework_TestCase ); } } - diff --git a/src/Symfony/Component/Config/Tests/Definition/Builder/EnumNodeDefinitionTest.php b/src/Symfony/Component/Config/Tests/Definition/Builder/EnumNodeDefinitionTest.php index 9f1955e4d0..b3c9f87ab0 100755 --- a/src/Symfony/Component/Config/Tests/Definition/Builder/EnumNodeDefinitionTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/Builder/EnumNodeDefinitionTest.php @@ -34,4 +34,4 @@ class EnumNodeDefinitionTest extends \PHPUnit_Framework_TestCase $node = $def->getNode(); $this->assertEquals(array('foo', 'bar'), $node->getValues()); } -} \ No newline at end of file +} diff --git a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php index 7d4c72bb26..6e7480ff25 100644 --- a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Config\Tests\Definition\Builder; use Symfony\Component\Config\Definition\Builder\TreeBuilder; - class ExprBuilderTest extends \PHPUnit_Framework_TestCase { @@ -160,6 +159,7 @@ class ExprBuilderTest extends \PHPUnit_Framework_TestCase protected function getTestBuilder() { $builder = new TreeBuilder(); + return $builder ->root('test') ->children() @@ -191,7 +191,8 @@ class ExprBuilderTest extends \PHPUnit_Framework_TestCase * @param $val The value that the closure must return * @return Closure */ - protected function returnClosure($val) { + protected function returnClosure($val) + { return function($v) use ($val) { return $val; }; diff --git a/src/Symfony/Component/Config/Tests/Definition/EnumNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/EnumNodeTest.php index 9c18da6276..8e3d66a378 100755 --- a/src/Symfony/Component/Config/Tests/Definition/EnumNodeTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/EnumNodeTest.php @@ -38,4 +38,4 @@ class EnumNodeTest extends \PHPUnit_Framework_TestCase $node = new EnumNode('foo', null, array('foo', 'bar')); $node->finalize('foobar'); } -} \ No newline at end of file +} diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index ec65e69c9c..cab5fe52b3 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -619,7 +619,7 @@ class Application * * @return array An array of abbreviations */ - static public function getAbbreviations($names) + public static function getAbbreviations($names) { $abbrevs = array(); foreach ($names as $name) { diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php b/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php index ca9f9d0e3f..0836084236 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php @@ -27,7 +27,7 @@ interface OutputFormatterInterface * * @api */ - function setDecorated($decorated); + public function setDecorated($decorated); /** * Gets the decorated flag. @@ -36,7 +36,7 @@ interface OutputFormatterInterface * * @api */ - function isDecorated(); + public function isDecorated(); /** * Sets a new style. @@ -46,7 +46,7 @@ interface OutputFormatterInterface * * @api */ - function setStyle($name, OutputFormatterStyleInterface $style); + public function setStyle($name, OutputFormatterStyleInterface $style); /** * Checks if output formatter has style with specified name. @@ -57,7 +57,7 @@ interface OutputFormatterInterface * * @api */ - function hasStyle($name); + public function hasStyle($name); /** * Gets style options from style with specified name. @@ -68,7 +68,7 @@ interface OutputFormatterInterface * * @api */ - function getStyle($name); + public function getStyle($name); /** * Formats a message according to the given styles. @@ -79,5 +79,5 @@ interface OutputFormatterInterface * * @api */ - function format($message); + public function format($message); } diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php index ad02b94289..3c6b8ad1f5 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Console\Formatter; */ class OutputFormatterStyle implements OutputFormatterStyleInterface { - static private $availableForegroundColors = array( + private static $availableForegroundColors = array( 'black' => 30, 'red' => 31, 'green' => 32, @@ -30,7 +30,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface 'cyan' => 36, 'white' => 37 ); - static private $availableBackgroundColors = array( + private static $availableBackgroundColors = array( 'black' => 40, 'red' => 41, 'green' => 42, @@ -40,7 +40,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface 'cyan' => 46, 'white' => 47 ); - static private $availableOptions = array( + private static $availableOptions = array( 'bold' => 1, 'underscore' => 4, 'blink' => 5, diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php index 3d84d96ac6..b5a55fef62 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php @@ -27,7 +27,7 @@ interface OutputFormatterStyleInterface * * @api */ - function setForeground($color = null); + public function setForeground($color = null); /** * Sets style background color. @@ -36,7 +36,7 @@ interface OutputFormatterStyleInterface * * @api */ - function setBackground($color = null); + public function setBackground($color = null); /** * Sets some specific style option. @@ -45,21 +45,21 @@ interface OutputFormatterStyleInterface * * @api */ - function setOption($option); + public function setOption($option); /** * Unsets some specific style option. * * @param string $option Theoption name */ - function unsetOption($option); + public function unsetOption($option); /** * Sets multiple style options at once. * * @param array $options */ - function setOptions(array $options); + public function setOptions(array $options); /** * Applies the style to a given text. @@ -68,5 +68,5 @@ interface OutputFormatterStyleInterface * * @return string */ - function apply($text); + public function apply($text); } diff --git a/src/Symfony/Component/Console/Helper/HelperInterface.php b/src/Symfony/Component/Console/Helper/HelperInterface.php index 25ee51393f..6d394496f6 100644 --- a/src/Symfony/Component/Console/Helper/HelperInterface.php +++ b/src/Symfony/Component/Console/Helper/HelperInterface.php @@ -27,7 +27,7 @@ interface HelperInterface * * @api */ - function setHelperSet(HelperSet $helperSet = null); + public function setHelperSet(HelperSet $helperSet = null); /** * Gets the helper set associated with this helper. @@ -36,7 +36,7 @@ interface HelperInterface * * @api */ - function getHelperSet(); + public function getHelperSet(); /** * Returns the canonical name of this helper. @@ -45,5 +45,5 @@ interface HelperInterface * * @api */ - function getName(); + public function getName(); } diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfony/Component/Console/Input/InputInterface.php index 8a3d5197e4..c39429d235 100644 --- a/src/Symfony/Component/Console/Input/InputInterface.php +++ b/src/Symfony/Component/Console/Input/InputInterface.php @@ -23,7 +23,7 @@ interface InputInterface * * @return string The value of the first argument or null otherwise */ - function getFirstArgument(); + public function getFirstArgument(); /** * Returns true if the raw parameters (not parsed) contain a value. @@ -35,7 +35,7 @@ interface InputInterface * * @return Boolean true if the value is contained in the raw parameters */ - function hasParameterOption($values); + public function hasParameterOption($values); /** * Returns the value of a raw option (not parsed). @@ -48,14 +48,14 @@ interface InputInterface * * @return mixed The option value */ - function getParameterOption($values, $default = false); + public function getParameterOption($values, $default = false); /** * Binds the current Input instance with the given arguments and options. * * @param InputDefinition $definition A InputDefinition instance */ - function bind(InputDefinition $definition); + public function bind(InputDefinition $definition); /** * Validates if arguments given are correct. @@ -64,14 +64,14 @@ interface InputInterface * * @throws \RuntimeException */ - function validate(); + public function validate(); /** * Returns all the given arguments merged with the default values. * * @return array */ - function getArguments(); + public function getArguments(); /** * Gets argument by name. @@ -80,7 +80,7 @@ interface InputInterface * * @return mixed */ - function getArgument($name); + public function getArgument($name); /** * Sets an argument value by name. @@ -90,7 +90,7 @@ interface InputInterface * * @throws \InvalidArgumentException When argument given doesn't exist */ - function setArgument($name, $value); + public function setArgument($name, $value); /** * Returns true if an InputArgument object exists by name or position. @@ -99,14 +99,14 @@ interface InputInterface * * @return Boolean true if the InputArgument object exists, false otherwise */ - function hasArgument($name); + public function hasArgument($name); /** * Returns all the given options merged with the default values. * * @return array */ - function getOptions(); + public function getOptions(); /** * Gets an option by name. @@ -115,7 +115,7 @@ interface InputInterface * * @return mixed */ - function getOption($name); + public function getOption($name); /** * Sets an option value by name. @@ -125,7 +125,7 @@ interface InputInterface * * @throws \InvalidArgumentException When option given doesn't exist */ - function setOption($name, $value); + public function setOption($name, $value); /** * Returns true if an InputOption object exists by name. @@ -134,19 +134,19 @@ interface InputInterface * * @return Boolean true if the InputOption object exists, false otherwise */ - function hasOption($name); + public function hasOption($name); /** * Is this input means interactive? * * @return Boolean */ - function isInteractive(); + public function isInteractive(); /** * Sets the input interactivity. * * @param Boolean $interactive If the input should be interactive */ - function setInteractive($interactive); + public function setInteractive($interactive); } diff --git a/src/Symfony/Component/Console/Output/OutputInterface.php b/src/Symfony/Component/Console/Output/OutputInterface.php index 8423d48c92..88ffba8878 100644 --- a/src/Symfony/Component/Console/Output/OutputInterface.php +++ b/src/Symfony/Component/Console/Output/OutputInterface.php @@ -41,7 +41,7 @@ interface OutputInterface * * @api */ - function write($messages, $newline = false, $type = 0); + public function write($messages, $newline = false, $type = 0); /** * Writes a message to the output and adds a newline at the end. @@ -51,7 +51,7 @@ interface OutputInterface * * @api */ - function writeln($messages, $type = 0); + public function writeln($messages, $type = 0); /** * Sets the verbosity of the output. @@ -60,7 +60,7 @@ interface OutputInterface * * @api */ - function setVerbosity($level); + public function setVerbosity($level); /** * Gets the current verbosity of the output. @@ -69,7 +69,7 @@ interface OutputInterface * * @api */ - function getVerbosity(); + public function getVerbosity(); /** * Sets the decorated flag. @@ -78,7 +78,7 @@ interface OutputInterface * * @api */ - function setDecorated($decorated); + public function setDecorated($decorated); /** * Gets the decorated flag. @@ -87,7 +87,7 @@ interface OutputInterface * * @api */ - function isDecorated(); + public function isDecorated(); /** * Sets output formatter. @@ -96,7 +96,7 @@ interface OutputInterface * * @api */ - function setFormatter(OutputFormatterInterface $formatter); + public function setFormatter(OutputFormatterInterface $formatter); /** * Returns current output formatter instance. @@ -105,5 +105,5 @@ interface OutputInterface * * @api */ - function getFormatter(); + public function getFormatter(); } diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php index 6fa4cffebd..9746507248 100644 --- a/src/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php @@ -21,9 +21,9 @@ use Symfony\Component\Console\Tester\ApplicationTester; class ApplicationTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/Fixtures/'); require_once self::$fixturesPath.'/FooCommand.php'; diff --git a/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/src/Symfony/Component/Console/Tests/Command/CommandTest.php index 557116ebd4..e248cff458 100644 --- a/src/Symfony/Component/Console/Tests/Command/CommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/CommandTest.php @@ -25,9 +25,9 @@ use Symfony\Component\Console\Tester\CommandTester; class CommandTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = __DIR__.'/../Fixtures/'; require_once self::$fixturesPath.'/TestCommand.php'; diff --git a/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php b/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php index 2b339f0906..20554ec621 100644 --- a/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php +++ b/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php @@ -17,11 +17,11 @@ use Symfony\Component\Console\Input\InputOption; class InputDefinitionTest extends \PHPUnit_Framework_TestCase { - static protected $fixtures; + protected static $fixtures; protected $foo, $bar, $foo1, $foo2; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixtures = __DIR__.'/../Fixtures/'; } @@ -97,7 +97,6 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase $this->assertEquals('Cannot add an argument after an array argument.', $e->getMessage()); } - // cannot add a required argument after an optional one $definition = new InputDefinition(); $definition->addArgument($this->foo); diff --git a/src/Symfony/Component/CssSelector/CssSelector.php b/src/Symfony/Component/CssSelector/CssSelector.php index f5566be1f4..f624fff7ee 100644 --- a/src/Symfony/Component/CssSelector/CssSelector.php +++ b/src/Symfony/Component/CssSelector/CssSelector.php @@ -42,7 +42,7 @@ class CssSelector * * @api */ - static public function toXPath($cssExpr, $prefix = 'descendant-or-self::') + public static function toXPath($cssExpr, $prefix = 'descendant-or-self::') { if (is_string($cssExpr)) { if (!$cssExpr) { diff --git a/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php b/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php index d37e4f1073..13e39270e0 100644 --- a/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php +++ b/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php @@ -23,7 +23,7 @@ use Symfony\Component\CssSelector\Exception\ParseException; */ class CombinedSelectorNode implements NodeInterface { - static protected $methodMapping = array( + protected static $methodMapping = array( ' ' => 'descendant', '>' => 'child', '+' => 'direct_adjacent', diff --git a/src/Symfony/Component/CssSelector/Node/FunctionNode.php b/src/Symfony/Component/CssSelector/Node/FunctionNode.php index 959f29df37..b392b27d07 100644 --- a/src/Symfony/Component/CssSelector/Node/FunctionNode.php +++ b/src/Symfony/Component/CssSelector/Node/FunctionNode.php @@ -24,7 +24,7 @@ use Symfony\Component\CssSelector\XPathExpr; */ class FunctionNode implements NodeInterface { - static protected $unsupported = array('target', 'lang', 'enabled', 'disabled'); + protected static $unsupported = array('target', 'lang', 'enabled', 'disabled'); protected $selector; protected $type; diff --git a/src/Symfony/Component/CssSelector/Node/NodeInterface.php b/src/Symfony/Component/CssSelector/Node/NodeInterface.php index 534f0dd7b1..113b1b75d7 100644 --- a/src/Symfony/Component/CssSelector/Node/NodeInterface.php +++ b/src/Symfony/Component/CssSelector/Node/NodeInterface.php @@ -26,12 +26,12 @@ interface NodeInterface * * @return string The string representation */ - function __toString(); + public function __toString(); /** * @return XPathExpr The XPath expression * * @throws ParseException When unknown operator is found */ - function toXpath(); + public function toXpath(); } diff --git a/src/Symfony/Component/CssSelector/Node/PseudoNode.php b/src/Symfony/Component/CssSelector/Node/PseudoNode.php index 3f93b70ab1..67f0beb595 100644 --- a/src/Symfony/Component/CssSelector/Node/PseudoNode.php +++ b/src/Symfony/Component/CssSelector/Node/PseudoNode.php @@ -23,7 +23,7 @@ use Symfony\Component\CssSelector\Exception\ParseException; */ class PseudoNode implements NodeInterface { - static protected $unsupported = array( + protected static $unsupported = array( 'indeterminate', 'first-line', 'first-letter', 'selection', 'before', 'after', 'link', 'visited', 'active', 'focus', 'hover', diff --git a/src/Symfony/Component/CssSelector/XPathExpr.php b/src/Symfony/Component/CssSelector/XPathExpr.php index 2e239ddd20..507b8ac16b 100644 --- a/src/Symfony/Component/CssSelector/XPathExpr.php +++ b/src/Symfony/Component/CssSelector/XPathExpr.php @@ -219,7 +219,7 @@ class XPathExpr * * @return string */ - static public function xpathLiteral($s) + public static function xpathLiteral($s) { if ($s instanceof Node\ElementNode) { // This is probably a symbol that looks like an expression... diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php b/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php index 1ae8bb9b78..beacda9dc7 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php @@ -29,5 +29,5 @@ interface CompilerPassInterface * * @api */ - function process(ContainerBuilder $container); + public function process(ContainerBuilder $container); } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/LoggingFormatter.php b/src/Symfony/Component/DependencyInjection/Compiler/LoggingFormatter.php index 0c6c90dbb3..6bd6161ceb 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/LoggingFormatter.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/LoggingFormatter.php @@ -11,7 +11,6 @@ namespace Symfony\Component\DependencyInjection\Compiler; - /** * Used to format logging messages during the compilation. * diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php b/src/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php index 81209c3893..d60ae35bc8 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php @@ -24,5 +24,5 @@ interface RepeatablePassInterface extends CompilerPassInterface * * @param RepeatedPass $repeatedPass */ - function setRepeatedPass(RepeatedPass $repeatedPass); + public function setRepeatedPass(RepeatedPass $repeatedPass); } diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 23bdbd6b31..88e1f26ecd 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -448,7 +448,7 @@ class Container implements IntrospectableContainerInterface * * @return string The camelized string */ - static public function camelize($id) + public static function camelize($id) { return preg_replace_callback('/(^|_|\.)+(.)/', function ($match) { return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); }, $id); } @@ -460,7 +460,7 @@ class Container implements IntrospectableContainerInterface * * @return string The underscored string */ - static public function underscore($id) + public static function underscore($id) { return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr($id, '_', '.'))); } diff --git a/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php b/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php index 1879ec0617..eb96632c66 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php +++ b/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php @@ -27,5 +27,5 @@ interface ContainerAwareInterface * * @api */ - function setContainer(ContainerInterface $container = null); + public function setContainer(ContainerInterface $container = null); } diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index 223ceead35..692cf91925 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -854,7 +854,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * * @return array An array of Service conditionals */ - static public function getServiceConditionals($value) + public static function getServiceConditionals($value) { $services = array(); diff --git a/src/Symfony/Component/DependencyInjection/ContainerInterface.php b/src/Symfony/Component/DependencyInjection/ContainerInterface.php index 6a5988eb11..d5e07a06a8 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerInterface.php +++ b/src/Symfony/Component/DependencyInjection/ContainerInterface.php @@ -38,7 +38,7 @@ interface ContainerInterface * * @api */ - function set($id, $service, $scope = self::SCOPE_CONTAINER); + public function set($id, $service, $scope = self::SCOPE_CONTAINER); /** * Gets a service. @@ -54,7 +54,7 @@ interface ContainerInterface * * @api */ - function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE); + public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE); /** * Returns true if the given service is defined. @@ -65,7 +65,7 @@ interface ContainerInterface * * @api */ - function has($id); + public function has($id); /** * Gets a parameter. @@ -78,7 +78,7 @@ interface ContainerInterface * * @api */ - function getParameter($name); + public function getParameter($name); /** * Checks if a parameter exists. @@ -89,7 +89,7 @@ interface ContainerInterface * * @api */ - function hasParameter($name); + public function hasParameter($name); /** * Sets a parameter. @@ -99,7 +99,7 @@ interface ContainerInterface * * @api */ - function setParameter($name, $value); + public function setParameter($name, $value); /** * Enters the given scope @@ -108,7 +108,7 @@ interface ContainerInterface * * @api */ - function enterScope($name); + public function enterScope($name); /** * Leaves the current scope, and re-enters the parent scope @@ -117,7 +117,7 @@ interface ContainerInterface * * @api */ - function leaveScope($name); + public function leaveScope($name); /** * Adds a scope to the container @@ -126,7 +126,7 @@ interface ContainerInterface * * @api */ - function addScope(ScopeInterface $scope); + public function addScope(ScopeInterface $scope); /** * Whether this container has the given scope @@ -137,7 +137,7 @@ interface ContainerInterface * * @api */ - function hasScope($name); + public function hasScope($name); /** * Determines whether the given scope is currently active. @@ -150,5 +150,5 @@ interface ContainerInterface * * @api */ - function isScopeActive($name); + public function isScopeActive($name); } diff --git a/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php b/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php index 6972cbf8fc..ba146f61c0 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php @@ -29,5 +29,5 @@ interface DumperInterface * * @api */ - function dump(array $options = array()); + public function dump(array $options = array()); } diff --git a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php index 113a242019..d8791ce196 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php @@ -281,7 +281,7 @@ class XmlDumper extends Dumper * * @param mixed $value Value to convert */ - static public function phpToXml($value) + public static function phpToXml($value) { switch (true) { case null === $value: diff --git a/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php index 4f33a9bc4c..1d96d240f4 100644 --- a/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php +++ b/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php @@ -28,5 +28,5 @@ interface ConfigurationExtensionInterface * * @return ConfigurationInterface|null The configuration or null */ - function getConfiguration(array $config, ContainerBuilder $container); + public function getConfiguration(array $config, ContainerBuilder $container); } diff --git a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php index 09ebcd84fd..fc015e1459 100644 --- a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php +++ b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php @@ -32,7 +32,7 @@ interface ExtensionInterface * * @api */ - function load(array $config, ContainerBuilder $container); + public function load(array $config, ContainerBuilder $container); /** * Returns the namespace to be used for this extension (XML namespace). @@ -41,7 +41,7 @@ interface ExtensionInterface * * @api */ - function getNamespace(); + public function getNamespace(); /** * Returns the base path for the XSD files. @@ -50,7 +50,7 @@ interface ExtensionInterface * * @api */ - function getXsdValidationBasePath(); + public function getXsdValidationBasePath(); /** * Returns the recommended alias to use in XML. @@ -61,5 +61,5 @@ interface ExtensionInterface * * @api */ - function getAlias(); + public function getAlias(); } diff --git a/src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php b/src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php index 0ffc7297bb..34d6cada9a 100644 --- a/src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php +++ b/src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php @@ -28,6 +28,6 @@ interface IntrospectableContainerInterface extends ContainerInterface * @return Boolean true if the service has been initialized, false otherwise * */ - function initialized($id); + public function initialized($id); } diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index 564cb36869..75250277a1 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -448,7 +448,7 @@ EOF * * @return array A PHP array */ - static public function convertDomElementToArray(\DomElement $element) + public static function convertDomElementToArray(\DomElement $element) { $empty = true; $config = array(); diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php index a9a4f02261..a26d6aee17 100644 --- a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php +++ b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php @@ -27,7 +27,7 @@ interface ParameterBagInterface * * @api */ - function clear(); + public function clear(); /** * Adds parameters to the service container parameters. @@ -36,7 +36,7 @@ interface ParameterBagInterface * * @api */ - function add(array $parameters); + public function add(array $parameters); /** * Gets the service container parameters. @@ -45,7 +45,7 @@ interface ParameterBagInterface * * @api */ - function all(); + public function all(); /** * Gets a service container parameter. @@ -58,7 +58,7 @@ interface ParameterBagInterface * * @api */ - function get($name); + public function get($name); /** * Sets a service container parameter. @@ -68,7 +68,7 @@ interface ParameterBagInterface * * @api */ - function set($name, $value); + public function set($name, $value); /** * Returns true if a parameter name is defined. @@ -79,12 +79,12 @@ interface ParameterBagInterface * * @api */ - function has($name); + public function has($name); /** * Replaces parameter placeholders (%name%) by their values for all parameters. */ - function resolve(); + public function resolve(); /** * Replaces parameter placeholders (%name%) by their values. @@ -93,7 +93,7 @@ interface ParameterBagInterface * * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist */ - function resolveValue($value); + public function resolveValue($value); /** * Escape parameter placeholders % @@ -102,7 +102,7 @@ interface ParameterBagInterface * * @return mixed */ - function escapeValue($value); + public function escapeValue($value); /** * Unescape parameter placeholders % @@ -111,5 +111,5 @@ interface ParameterBagInterface * * @return mixed */ - function unescapeValue($value); + public function unescapeValue($value); } diff --git a/src/Symfony/Component/DependencyInjection/ScopeInterface.php b/src/Symfony/Component/DependencyInjection/ScopeInterface.php index 44b8c5d9a7..81ac67cc4d 100644 --- a/src/Symfony/Component/DependencyInjection/ScopeInterface.php +++ b/src/Symfony/Component/DependencyInjection/ScopeInterface.php @@ -23,10 +23,10 @@ interface ScopeInterface /** * @api */ - function getName(); + public function getName(); /** * @api */ - function getParentName(); + public function getParentName(); } diff --git a/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php b/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php index 457d54fa1c..d154602fd3 100644 --- a/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php +++ b/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php @@ -99,7 +99,7 @@ class SimpleXMLElement extends \SimpleXMLElement * * @return mixed */ - static public function phpize($value) + public static function phpize($value) { $value = (string) $value; $lowercaseValue = strtolower($value); diff --git a/src/Symfony/Component/DependencyInjection/TaggedContainerInterface.php b/src/Symfony/Component/DependencyInjection/TaggedContainerInterface.php index 81adb2096d..3b4881703c 100644 --- a/src/Symfony/Component/DependencyInjection/TaggedContainerInterface.php +++ b/src/Symfony/Component/DependencyInjection/TaggedContainerInterface.php @@ -29,5 +29,5 @@ interface TaggedContainerInterface extends ContainerInterface * * @api */ - function findTaggedServiceIds($name); + public function findTaggedServiceIds($name); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index 4d650f9b87..c9e6b07847 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -550,5 +550,4 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase } } - class FooClass {} diff --git a/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php b/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php index 557c207c36..ec82cc1e80 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Config\FileLocator; class CrossCheckTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -25,7 +25,7 @@ class CrossCheckTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = __DIR__.'/Fixtures/'; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php index 69e775d26c..d3b93fdee8 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php @@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\Dumper\GraphvizDumper; class GraphvizDumperTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -25,7 +25,7 @@ class GraphvizDumperTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = __DIR__.'/../Fixtures/'; } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index a072356064..c1e2070a98 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -19,7 +19,7 @@ use Symfony\Component\DependencyInjection\Definition; class PhpDumperTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -28,7 +28,7 @@ class PhpDumperTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php index 6618982e07..b2cddb593d 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php @@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\Dumper\XmlDumper; class XmlDumperTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -25,7 +25,7 @@ class XmlDumperTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php index 2dcb3b8212..47cc4bea1e 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php @@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\Dumper\YamlDumper; class YamlDumperTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -25,7 +25,7 @@ class YamlDumperTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php index 3c27376591..514df23e51 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php @@ -16,17 +16,17 @@ class BazClass $instance->configure(); } - static public function getInstance() + public static function getInstance() { return new self(); } - static public function configureStatic($instance) + public static function configureStatic($instance) { $instance->configure(); } - static public function configureStatic1() + public static function configureStatic1() { } } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php index 2c53122756..180bb384a3 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php @@ -11,7 +11,7 @@ class FooClass $this->arguments = $arguments; } - static public function getInstance($arguments = array()) + public static function getInstance($arguments = array()) { $obj = new self($arguments); $obj->called = true; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php index 448934c48d..bba9c8c85f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php @@ -17,12 +17,12 @@ use Symfony\Component\Config\FileLocator; class IniFileLoaderTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected $container; protected $loader; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php index 1a157e6dcf..12109c2b49 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php @@ -25,7 +25,7 @@ use Symfony\Component\Config\FileLocator; class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -34,7 +34,7 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); require_once self::$fixturesPath.'/includes/foo.php'; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php index 35b59853b0..e655d3bd89 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php @@ -23,7 +23,7 @@ use Symfony\Component\Config\FileLocator; class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -36,7 +36,7 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); require_once self::$fixturesPath.'/includes/foo.php'; diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index 03c1dc5d7d..b408d7d534 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -667,7 +667,7 @@ class Crawler extends \SplObjectStorage * @return string Converted string * */ - static public function xpathLiteral($s) + public static function xpathLiteral($s) { if (false === strpos($s, "'")) { return sprintf("'%s'", $s); diff --git a/src/Symfony/Component/DomCrawler/Form.php b/src/Symfony/Component/DomCrawler/Form.php index 9e60711981..9106a232e9 100644 --- a/src/Symfony/Component/DomCrawler/Form.php +++ b/src/Symfony/Component/DomCrawler/Form.php @@ -525,7 +525,7 @@ class FormFieldRegistry * * @return FormFieldRegistry */ - static private function create($base, array $values) + private static function create($base, array $values) { $registry = new static(); $registry->base = $base; diff --git a/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php b/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php index 0a538765bd..a67a979014 100644 --- a/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php +++ b/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php @@ -21,12 +21,12 @@ interface TraceableEventDispatcherInterface * * @return array An array of called listeners */ - function getCalledListeners(); + public function getCalledListeners(); /** * Gets the not called listeners. * * @return array An array of not called listeners */ - function getNotCalledListeners(); + public function getNotCalledListeners(); } diff --git a/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php b/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php index e53d71d0e5..7aead23b0d 100644 --- a/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php +++ b/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php @@ -35,7 +35,7 @@ interface EventDispatcherInterface * * @api */ - function dispatch($eventName, Event $event = null); + public function dispatch($eventName, Event $event = null); /** * Adds an event listener that listens on the specified events. @@ -47,7 +47,7 @@ interface EventDispatcherInterface * * @api */ - function addListener($eventName, $listener, $priority = 0); + public function addListener($eventName, $listener, $priority = 0); /** * Adds an event subscriber. @@ -59,7 +59,7 @@ interface EventDispatcherInterface * * @api */ - function addSubscriber(EventSubscriberInterface $subscriber); + public function addSubscriber(EventSubscriberInterface $subscriber); /** * Removes an event listener from the specified events. @@ -67,14 +67,14 @@ interface EventDispatcherInterface * @param string|array $eventName The event(s) to remove a listener from * @param callable $listener The listener to remove */ - function removeListener($eventName, $listener); + public function removeListener($eventName, $listener); /** * Removes an event subscriber. * * @param EventSubscriberInterface $subscriber The subscriber */ - function removeSubscriber(EventSubscriberInterface $subscriber); + public function removeSubscriber(EventSubscriberInterface $subscriber); /** * Gets the listeners of a specific event or all listeners. @@ -83,7 +83,7 @@ interface EventDispatcherInterface * * @return array The event listeners for the specified event, or all event listeners by event name */ - function getListeners($eventName = null); + public function getListeners($eventName = null); /** * Checks whether an event has any registered listeners. @@ -92,5 +92,5 @@ interface EventDispatcherInterface * * @return Boolean true if the specified event has any listeners, false otherwise */ - function hasListeners($eventName = null); + public function hasListeners($eventName = null); } diff --git a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php b/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php index 1e85b988bf..080f892fdf 100644 --- a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php +++ b/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php @@ -46,5 +46,5 @@ interface EventSubscriberInterface * * @api */ - static function getSubscribedEvents(); + public static function getSubscribedEvents(); } diff --git a/src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php index c62fc10bad..71f3ad0521 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php @@ -235,14 +235,14 @@ class ContainerAwareEventDispatcherTest extends \PHPUnit_Framework_TestCase class Service { - function onEvent(Event $e) + public function onEvent(Event $e) { } } class SubscriberService implements EventSubscriberInterface { - static function getSubscribedEvents() + public static function getSubscribedEvents() { return array( 'onEvent' => 'onEvent', @@ -251,7 +251,7 @@ class SubscriberService implements EventSubscriberInterface ); } - function onEvent(Event $e) + public function onEvent(Event $e) { } } diff --git a/src/Symfony/Component/EventDispatcher/Tests/EventTest.php b/src/Symfony/Component/EventDispatcher/Tests/EventTest.php index cbc3910a14..52aa9ad68a 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/EventTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/EventTest.php @@ -29,7 +29,6 @@ class EventTest extends \PHPUnit_Framework_TestCase */ protected $dispatcher; - /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php index f4b3c7d8c3..30ca1be822 100644 --- a/src/Symfony/Component/Finder/Finder.php +++ b/src/Symfony/Component/Finder/Finder.php @@ -47,7 +47,7 @@ class Finder implements \IteratorAggregate, \Countable private $contains = array(); private $notContains = array(); - static private $vcsPatterns = array('.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'); + private static $vcsPatterns = array('.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'); /** * Constructor. @@ -64,7 +64,7 @@ class Finder implements \IteratorAggregate, \Countable * * @api */ - static public function create() + public static function create() { return new self(); } @@ -318,7 +318,7 @@ class Finder implements \IteratorAggregate, \Countable return $this; } - static public function addVCSPattern($pattern) + public static function addVCSPattern($pattern) { self::$vcsPatterns[] = $pattern; } diff --git a/src/Symfony/Component/Finder/Glob.php b/src/Symfony/Component/Finder/Glob.php index 5e31b75dbd..dd26384ed7 100644 --- a/src/Symfony/Component/Finder/Glob.php +++ b/src/Symfony/Component/Finder/Glob.php @@ -44,7 +44,7 @@ class Glob * * @return string regex The regexp */ - static public function toRegex($glob, $strictLeadingDot = true, $strictWildcardSlash = true) + public static function toRegex($glob, $strictLeadingDot = true, $strictWildcardSlash = true) { $firstByte = true; $escaping = false; diff --git a/src/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php b/src/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php index e5d1135201..42199abebd 100644 --- a/src/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php +++ b/src/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Finder\Iterator; - /** * MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings). * diff --git a/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/Symfony/Component/Finder/Tests/FinderTest.php index fc06e1ed6d..05ed82fd46 100644 --- a/src/Symfony/Component/Finder/Tests/FinderTest.php +++ b/src/Symfony/Component/Finder/Tests/FinderTest.php @@ -15,9 +15,9 @@ use Symfony\Component\Finder\Finder; class FinderTest extends Iterator\RealIteratorTestCase { - static protected $tmpDir; + protected static $tmpDir; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { parent::setUpBeforeClass(); @@ -172,7 +172,6 @@ class FinderTest extends Iterator\RealIteratorTestCase $this->assertIterator($this->toAbsolute(array('foo', 'toto', 'foo/bar.tmp', 'test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); } - public function testSortByAccessedTime() { $finder = new Finder(); diff --git a/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php b/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php index 1772d4bd28..b7b7b40cc3 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php @@ -13,9 +13,9 @@ namespace Symfony\Component\Finder\Tests\Iterator; abstract class RealIteratorTestCase extends IteratorTestCase { - static protected $files; + protected static $files; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { $tmpDir = sys_get_temp_dir().'/symfony2_finder'; self::$files = array( @@ -51,7 +51,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase touch($tmpDir.'/test.php', strtotime('2005-10-15')); } - static public function tearDownAfterClass() + public static function tearDownAfterClass() { foreach (array_reverse(self::$files) as $file) { if ('/' === $file[strlen($file) - 1]) { diff --git a/src/Symfony/Component/Form/DataMapperInterface.php b/src/Symfony/Component/Form/DataMapperInterface.php index 75841865cd..a574cbc8de 100644 --- a/src/Symfony/Component/Form/DataMapperInterface.php +++ b/src/Symfony/Component/Form/DataMapperInterface.php @@ -24,7 +24,7 @@ interface DataMapperInterface * * @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported. */ - function mapDataToForms($data, array $forms); + public function mapDataToForms($data, array $forms); /** * Maps the data of a list of forms into the properties of some data. @@ -34,5 +34,5 @@ interface DataMapperInterface * * @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported. */ - function mapFormsToData(array $forms, &$data); + public function mapFormsToData(array $forms, &$data); } diff --git a/src/Symfony/Component/Form/DataTransformerInterface.php b/src/Symfony/Component/Form/DataTransformerInterface.php index 251ec17627..07183d54b3 100644 --- a/src/Symfony/Component/Form/DataTransformerInterface.php +++ b/src/Symfony/Component/Form/DataTransformerInterface.php @@ -46,7 +46,7 @@ interface DataTransformerInterface * @throws UnexpectedTypeException when the argument is not a string * @throws TransformationFailedException when the transformation fails */ - function transform($value); + public function transform($value); /** * Transforms a value from the transformed representation to its original @@ -73,5 +73,5 @@ interface DataTransformerInterface * @throws UnexpectedTypeException when the argument is not of the expected type * @throws TransformationFailedException when the transformation fails */ - function reverseTransform($value); + public function reverseTransform($value); } diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php index 8c95f58387..80abc73429 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php @@ -335,7 +335,7 @@ class ChoiceList implements ChoiceListInterface { $index = $this->createIndex($choice); - if ('' === $index || null === $index || !FormConfig::isValidName((string)$index)) { + if ('' === $index || null === $index || !FormConfig::isValidName((string) $index)) { throw new InvalidConfigurationException('The index "' . $index . '" created by the choice list is invalid. It should be a valid, non-empty Form name.'); } diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php index b4ce590d28..c81c560f4f 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php @@ -33,14 +33,14 @@ interface ChoiceListInterface * * @return array The choices with their indices as keys. */ - function getChoices(); + public function getChoices(); /** * Returns the values for the choices * * @return array The values with the corresponding choice indices as keys. */ - function getValues(); + public function getValues(); /** * Returns the choice views of the preferred choices as nested array with @@ -64,7 +64,7 @@ interface ChoiceListInterface * choice indices as keys on the lowest levels and the choice * group names in the keys of the higher levels. */ - function getPreferredViews(); + public function getPreferredViews(); /** * Returns the choice views of the choices that are not preferred as nested @@ -90,7 +90,7 @@ interface ChoiceListInterface * * @see getPreferredValues */ - function getRemainingViews(); + public function getRemainingViews(); /** * Returns the choices corresponding to the given values. @@ -100,7 +100,7 @@ interface ChoiceListInterface * * @return array An array of choices with ascending, 0-based numeric keys */ - function getChoicesForValues(array $values); + public function getChoicesForValues(array $values); /** * Returns the values corresponding to the given choices. @@ -111,7 +111,7 @@ interface ChoiceListInterface * @return array An array of choice values with ascending, 0-based numeric * keys */ - function getValuesForChoices(array $choices); + public function getValuesForChoices(array $choices); /** * Returns the indices corresponding to the given choices. @@ -121,7 +121,7 @@ interface ChoiceListInterface * * @return array An array of indices with ascending, 0-based numeric keys */ - function getIndicesForChoices(array $choices); + public function getIndicesForChoices(array $choices); /** * Returns the indices corresponding to the given values. @@ -131,5 +131,5 @@ interface ChoiceListInterface * * @return array An array of indices with ascending, 0-based numeric keys */ - function getIndicesForValues(array $values); + public function getIndicesForValues(array $values); } diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php index 38d714dcf6..f1af179b6b 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Form\Extension\Core\ChoiceList; - use Symfony\Component\Form\Exception\UnexpectedTypeException; /** diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php index 30beb13029..940af59e85 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php @@ -159,6 +159,7 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer $intlDateFormatter = new \IntlDateFormatter(\Locale::getDefault(), $dateFormat, $timeFormat, $timezone, $calendar, $pattern); $intlDateFormatter->setLenient(false); + return $intlDateFormatter; } } diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php index 1cb89e58eb..083e23e946 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php @@ -44,7 +44,7 @@ class FixCheckboxInputListener implements EventSubscriberInterface $event->setData(count($indices) > 0 ? array_combine($indices, $values) : array()); } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array(FormEvents::PRE_BIND => 'preBind'); } diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php index 0bf24a288f..c60bd26b53 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php @@ -44,7 +44,7 @@ class FixRadioInputListener implements EventSubscriberInterface $event->setData(false !== $index ? array($index => $value) : array()); } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array(FormEvents::PRE_BIND => 'preBind'); } diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php index 05a7253c41..1079903b59 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php @@ -38,7 +38,7 @@ class FixUrlProtocolListener implements EventSubscriberInterface } } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array(FormEvents::BIND => 'onBind'); } diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php index 5d76a78904..ec887015b1 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php @@ -47,7 +47,7 @@ class MergeCollectionListener implements EventSubscriberInterface $this->allowDelete = $allowDelete; } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( FormEvents::BIND => 'onBind', diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php index 027ec7e346..7c34a99161 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php @@ -60,7 +60,7 @@ class ResizeFormListener implements EventSubscriberInterface $this->options = $options; } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( FormEvents::PRE_SET_DATA => 'preSetData', diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php index 0f93b8d174..c5d692052d 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php @@ -31,7 +31,7 @@ class TrimListener implements EventSubscriberInterface } } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array(FormEvents::PRE_BIND => 'preBind'); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php index 8d4c8c00a7..cb64215171 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Form\Extension\Core\Type; use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Util\PropertyPath; use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormInterface; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php b/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php index 8d4f414ad2..4722b37e9b 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php @@ -81,7 +81,7 @@ class MoneyType extends AbstractType * The pattern contains the placeholder "{{ widget }}" where the HTML tag should * be inserted */ - static private function getPattern($currency) + private static function getPattern($currency) { if (!$currency) { return '{{ widget }}'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php b/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php index cf3f3d8405..ac6a3c925e 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Form\Extension\Core\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormViewInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php index 178170f4a3..cd4a2ad38b 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php @@ -20,7 +20,7 @@ class TimezoneType extends AbstractType * Stores the available timezone choices * @var array */ - static private $timezones; + private static $timezones; /** * {@inheritdoc} @@ -58,7 +58,7 @@ class TimezoneType extends AbstractType * * @return array The timezone choices */ - static public function getTimezones() + public static function getTimezones() { if (null === static::$timezones) { static::$timezones = array(); diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php index 340a74a1c9..322a4f8326 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php @@ -35,7 +35,7 @@ interface CsrfProviderInterface * @param string $intention Some value that identifies the action intention * (i.e. "authenticate"). Doesn't have to be a secret value. */ - function generateCsrfToken($intention); + public function generateCsrfToken($intention); /** * Validates a CSRF token. @@ -45,5 +45,5 @@ interface CsrfProviderInterface * * @return Boolean Whether the token supplied by the browser is correct */ - function isCsrfTokenValid($intention, $token); + public function isCsrfTokenValid($intention, $token); } diff --git a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php index a440dcd6a7..25a835fdab 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php +++ b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php @@ -44,7 +44,7 @@ class CsrfValidationListener implements EventSubscriberInterface */ private $intention; - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( FormEvents::PRE_BIND => 'preBind', diff --git a/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php b/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php index f40ac217ff..dd2c51ab57 100644 --- a/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php +++ b/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php @@ -30,7 +30,7 @@ class ValidationListener implements EventSubscriberInterface /** * {@inheritdoc} */ - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array(FormEvents::POST_BIND => 'validateForm'); } diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php index eef8b0eb54..7b96efb4d6 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\Util\PropertyPathInterface; use Symfony\Component\Form\Exception\ErrorMappingException; /** diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php index 49b7c61bb9..eb8907f1af 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php @@ -29,5 +29,5 @@ interface ViolationMapperInterface * @param Boolean $allowNonSynchronized Whether to allow * mapping to non-synchronized forms. */ - function mapViolation(ConstraintViolation $violation, FormInterface $form, $allowNonSynchronized = false); + public function mapViolation(ConstraintViolation $violation, FormInterface $form, $allowNonSynchronized = false); } diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php index 79a13fac7f..f5517f2e56 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; use Symfony\Component\Form\Util\PropertyPath; -use Symfony\Component\Form\Util\PropertyPathIterator; use Symfony\Component\Form\Util\PropertyPathInterface; /** @@ -232,7 +231,6 @@ class ViolationPath implements \IteratorAggregate, PropertyPathInterface return $this->mapsForm[$index]; } - /** * Returns a new iterator for this path * diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPathIterator.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPathIterator.php index c4970b95ed..531da861eb 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPathIterator.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPathIterator.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; use Symfony\Component\Form\Util\PropertyPathIterator; -use Symfony\Component\Form\Util\PropertyPath; /** * @author Bernhard Schussek diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index 58135fed50..729625fe51 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -18,7 +18,6 @@ use Symfony\Component\Form\Exception\TransformationFailedException; use Symfony\Component\Form\Util\FormUtil; use Symfony\Component\Form\Util\PropertyPath; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** * Form represents a form. diff --git a/src/Symfony/Component/Form/FormBuilder.php b/src/Symfony/Component/Form/FormBuilder.php index cc759f65fb..8a33cd5869 100644 --- a/src/Symfony/Component/Form/FormBuilder.php +++ b/src/Symfony/Component/Form/FormBuilder.php @@ -15,7 +15,6 @@ use Symfony\Component\Form\Exception\FormException; use Symfony\Component\Form\Exception\UnexpectedTypeException; use Symfony\Component\Form\Exception\CircularReferenceException; use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * A builder for creating {@link Form} instances. diff --git a/src/Symfony/Component/Form/FormBuilderInterface.php b/src/Symfony/Component/Form/FormBuilderInterface.php index f9e9135faf..bc8eee1b58 100644 --- a/src/Symfony/Component/Form/FormBuilderInterface.php +++ b/src/Symfony/Component/Form/FormBuilderInterface.php @@ -29,7 +29,7 @@ interface FormBuilderInterface extends FormConfigEditorInterface, \Traversable, * * @return FormBuilderInterface The builder object. */ - function add($child, $type = null, array $options = array()); + public function add($child, $type = null, array $options = array()); /** * Creates a form builder. @@ -40,7 +40,7 @@ interface FormBuilderInterface extends FormConfigEditorInterface, \Traversable, * * @return FormBuilderInterface The created builder. */ - function create($name, $type = null, array $options = array()); + public function create($name, $type = null, array $options = array()); /** * Returns a child by name. @@ -51,7 +51,7 @@ interface FormBuilderInterface extends FormConfigEditorInterface, \Traversable, * * @throws Exception\FormException if the given child does not exist */ - function get($name); + public function get($name); /** * Removes the field with the given name. * @@ -59,7 +59,7 @@ interface FormBuilderInterface extends FormConfigEditorInterface, \Traversable, * * @return FormBuilderInterface The builder object. */ - function remove($name); + public function remove($name); /** * Returns whether a field with the given name exists. @@ -68,28 +68,28 @@ interface FormBuilderInterface extends FormConfigEditorInterface, \Traversable, * * @return Boolean */ - function has($name); + public function has($name); /** * Returns the children. * * @return array */ - function all(); + public function all(); /** * Returns the associated form factory. * * @return FormFactoryInterface The factory */ - function getFormFactory(); + public function getFormFactory(); /** * Creates the form. * * @return Form The form */ - function getForm(); + public function getForm(); /** * Sets the parent builder. @@ -98,19 +98,19 @@ interface FormBuilderInterface extends FormConfigEditorInterface, \Traversable, * * @return FormBuilderInterface The builder object. */ - function setParent(FormBuilderInterface $parent = null); + public function setParent(FormBuilderInterface $parent = null); /** * Returns the parent builder. * * @return FormBuilderInterface The parent builder */ - function getParent(); + public function getParent(); /** * Returns whether the builder has a parent. * * @return Boolean */ - function hasParent(); + public function hasParent(); } diff --git a/src/Symfony/Component/Form/FormConfig.php b/src/Symfony/Component/Form/FormConfig.php index 6b30bfeeb3..08e5b006ae 100644 --- a/src/Symfony/Component/Form/FormConfig.php +++ b/src/Symfony/Component/Form/FormConfig.php @@ -683,7 +683,7 @@ class FormConfig implements FormConfigEditorInterface * @throws UnexpectedTypeException If the name is not a string. * @throws \InvalidArgumentException If the name contains invalid characters. */ - static public function validateName($name) + public static function validateName($name) { if (!is_string($name)) { throw new UnexpectedTypeException($name, 'string'); @@ -711,7 +711,7 @@ class FormConfig implements FormConfigEditorInterface * * @return Boolean Whether the name is valid. */ - static public function isValidName($name) + public static function isValidName($name) { return '' === $name || preg_match('/^[a-zA-Z0-9_][a-zA-Z0-9_\-:]*$/D', $name); } diff --git a/src/Symfony/Component/Form/FormConfigEditorInterface.php b/src/Symfony/Component/Form/FormConfigEditorInterface.php index 10c1e04d0f..c893fd223a 100644 --- a/src/Symfony/Component/Form/FormConfigEditorInterface.php +++ b/src/Symfony/Component/Form/FormConfigEditorInterface.php @@ -29,7 +29,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function addEventListener($eventName, $listener, $priority = 0); + public function addEventListener($eventName, $listener, $priority = 0); /** * Adds an event subscriber for events on this form. @@ -38,7 +38,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function addEventSubscriber(EventSubscriberInterface $subscriber); + public function addEventSubscriber(EventSubscriberInterface $subscriber); /** * Adds a validator to the form. @@ -49,7 +49,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @deprecated Deprecated since version 2.1, to be removed in 2.3. */ - function addValidator(FormValidatorInterface $validator); + public function addValidator(FormValidatorInterface $validator); /** * Appends / prepends a transformer to the view transformer chain. @@ -64,14 +64,14 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function addViewTransformer(DataTransformerInterface $viewTransformer, $forcePrepend = false); + public function addViewTransformer(DataTransformerInterface $viewTransformer, $forcePrepend = false); /** * Clears the view transformers. * * @return self The configuration object. */ - function resetViewTransformers(); + public function resetViewTransformers(); /** * Prepends / appends a transformer to the normalization transformer chain. @@ -86,14 +86,14 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function addModelTransformer(DataTransformerInterface $modelTransformer, $forceAppend = false); + public function addModelTransformer(DataTransformerInterface $modelTransformer, $forceAppend = false); /** * Clears the normalization transformers. * * @return self The configuration object. */ - function resetModelTransformers(); + public function resetModelTransformers(); /** * Sets the value for an attribute. @@ -103,7 +103,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setAttribute($name, $value); + public function setAttribute($name, $value); /** * Sets the attributes. @@ -112,7 +112,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setAttributes(array $attributes); + public function setAttributes(array $attributes); /** * Sets the data mapper used by the form. @@ -121,7 +121,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setDataMapper(DataMapperInterface $dataMapper = null); + public function setDataMapper(DataMapperInterface $dataMapper = null); /** * Set whether the form is disabled. @@ -130,7 +130,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setDisabled($disabled); + public function setDisabled($disabled); /** * Sets the data used for the client data when no value is bound. @@ -139,7 +139,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setEmptyData($emptyData); + public function setEmptyData($emptyData); /** * Sets whether errors bubble up to the parent. @@ -148,7 +148,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setErrorBubbling($errorBubbling); + public function setErrorBubbling($errorBubbling); /** * Sets whether this field is required to be filled out when bound. @@ -157,7 +157,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setRequired($required); + public function setRequired($required); /** * Sets the property path that the form should be mapped to. @@ -168,7 +168,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setPropertyPath($propertyPath); + public function setPropertyPath($propertyPath); /** * Sets whether the form should be mapped to an element of its @@ -178,7 +178,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setMapped($mapped); + public function setMapped($mapped); /** * Sets whether the form's data should be modified by reference. @@ -188,7 +188,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setByReference($byReference); + public function setByReference($byReference); /** * Sets whether the form should be virtual. @@ -197,7 +197,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setVirtual($virtual); + public function setVirtual($virtual); /** * Sets whether the form should be compound. @@ -208,7 +208,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @see FormConfigInterface::getCompound() */ - function setCompound($compound); + public function setCompound($compound); /** * Set the types. @@ -217,7 +217,7 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setTypes(array $types); + public function setTypes(array $types); /** * Sets the initial data of the form. @@ -226,5 +226,5 @@ interface FormConfigEditorInterface extends FormConfigInterface * * @return self The configuration object. */ - function setData($data); + public function setData($data); } diff --git a/src/Symfony/Component/Form/FormConfigInterface.php b/src/Symfony/Component/Form/FormConfigInterface.php index 22354d8fc1..74971d3ad5 100644 --- a/src/Symfony/Component/Form/FormConfigInterface.php +++ b/src/Symfony/Component/Form/FormConfigInterface.php @@ -23,21 +23,21 @@ interface FormConfigInterface * * @return \Symfony\Component\EventDispatcher\EventDispatcherInterface The dispatcher. */ - function getEventDispatcher(); + public function getEventDispatcher(); /** * Returns the name of the form used as HTTP parameter. * * @return string The form name. */ - function getName(); + public function getName(); /** * Returns the property path that the form should be mapped to. * * @return Util\PropertyPath The property path. */ - function getPropertyPath(); + public function getPropertyPath(); /** * Returns whether the form should be mapped to an element of its @@ -45,14 +45,14 @@ interface FormConfigInterface * * @return Boolean Whether the form is mapped. */ - function getMapped(); + public function getMapped(); /** * Returns whether the form's data should be modified by reference. * * @return Boolean Whether to modify the form's data by reference. */ - function getByReference(); + public function getByReference(); /** * Returns whether the form should be virtual. @@ -63,7 +63,7 @@ interface FormConfigInterface * * @return Boolean Whether the form is virtual. */ - function getVirtual(); + public function getVirtual(); /** * Returns whether the form is compound. @@ -74,35 +74,35 @@ interface FormConfigInterface * * @return Boolean Whether the form is compound. */ - function getCompound(); + public function getCompound(); /** * Returns the form types used to construct the form. * * @return array An array of {@link FormTypeInterface} instances. */ - function getTypes(); + public function getTypes(); /** * Returns the view transformers of the form. * * @return array An array of {@link DataTransformerInterface} instances. */ - function getViewTransformers(); + public function getViewTransformers(); /** * Returns the model transformers of the form. * * @return array An array of {@link DataTransformerInterface} instances. */ - function getModelTransformers(); + public function getModelTransformers(); /** * Returns the data mapper of the form. * * @return DataMapperInterface The data mapper. */ - function getDataMapper(); + public function getDataMapper(); /** * Returns the validators of the form. @@ -111,42 +111,42 @@ interface FormConfigInterface * * @deprecated Deprecated since version 2.1, to be removed in 2.3. */ - function getValidators(); + public function getValidators(); /** * Returns whether the form is required. * * @return Boolean Whether the form is required. */ - function getRequired(); + public function getRequired(); /** * Returns whether the form is disabled. * * @return Boolean Whether the form is disabled. */ - function getDisabled(); + public function getDisabled(); /** * Returns whether errors attached to the form will bubble to its parent. * * @return Boolean Whether errors will bubble up. */ - function getErrorBubbling(); + public function getErrorBubbling(); /** * Returns the data that should be returned when the form is empty. * * @return mixed The data returned if the form is empty. */ - function getEmptyData(); + public function getEmptyData(); /** * Returns additional attributes of the form. * * @return array An array of key-value combinations. */ - function getAttributes(); + public function getAttributes(); /** * Returns whether the attribute with the given name exists. @@ -155,7 +155,7 @@ interface FormConfigInterface * * @return Boolean Whether the attribute exists. */ - function hasAttribute($name); + public function hasAttribute($name); /** * Returns the value of the given attribute. @@ -165,28 +165,28 @@ interface FormConfigInterface * * @return mixed The attribute value. */ - function getAttribute($name, $default = null); + public function getAttribute($name, $default = null); /** * Returns the initial data of the form. * * @return mixed The initial form data. */ - function getData(); + public function getData(); /** * Returns the class of the form data or null if the data is scalar or an array. * * @return string The data class or null. */ - function getDataClass(); + public function getDataClass(); /** * Returns all options passed during the construction of the form. * * @return array The passed options. */ - function getOptions(); + public function getOptions(); /** * Returns whether a specific option exists. @@ -195,7 +195,7 @@ interface FormConfigInterface * * @return Boolean Whether the option exists. */ - function hasOption($name); + public function hasOption($name); /** * Returns the value of a specific option. @@ -205,5 +205,5 @@ interface FormConfigInterface * * @return mixed The option value. */ - function getOption($name, $default = null); + public function getOption($name, $default = null); } diff --git a/src/Symfony/Component/Form/FormExtensionInterface.php b/src/Symfony/Component/Form/FormExtensionInterface.php index e3c2b78b96..5347c451d2 100644 --- a/src/Symfony/Component/Form/FormExtensionInterface.php +++ b/src/Symfony/Component/Form/FormExtensionInterface.php @@ -25,7 +25,7 @@ interface FormExtensionInterface * * @throws Exception\FormException if the given type is not supported by this extension */ - function getType($name); + public function getType($name); /** * Returns whether the given type is supported. @@ -34,7 +34,7 @@ interface FormExtensionInterface * * @return Boolean Whether the type is supported by this extension */ - function hasType($name); + public function hasType($name); /** * Returns the extensions for the given type. @@ -43,7 +43,7 @@ interface FormExtensionInterface * * @return array An array of extensions as FormTypeExtensionInterface instances */ - function getTypeExtensions($name); + public function getTypeExtensions($name); /** * Returns whether this extension provides type extensions for the given type. @@ -52,12 +52,12 @@ interface FormExtensionInterface * * @return Boolean Whether the given type has extensions */ - function hasTypeExtensions($name); + public function hasTypeExtensions($name); /** * Returns the type guesser provided by this extension. * * @return FormTypeGuesserInterface|null The type guesser */ - function getTypeGuesser(); + public function getTypeGuesser(); } diff --git a/src/Symfony/Component/Form/FormFactoryInterface.php b/src/Symfony/Component/Form/FormFactoryInterface.php index 6b242b3459..457be5e24f 100644 --- a/src/Symfony/Component/Form/FormFactoryInterface.php +++ b/src/Symfony/Component/Form/FormFactoryInterface.php @@ -30,7 +30,7 @@ interface FormFactoryInterface * * @throws Exception\FormException if any given option is not applicable to the given type */ - function create($type, $data = null, array $options = array(), FormBuilderInterface $parent = null); + public function create($type, $data = null, array $options = array(), FormBuilderInterface $parent = null); /** * Returns a form. @@ -47,7 +47,7 @@ interface FormFactoryInterface * * @throws Exception\FormException if any given option is not applicable to the given type */ - function createNamed($name, $type, $data = null, array $options = array(), FormBuilderInterface $parent = null); + public function createNamed($name, $type, $data = null, array $options = array(), FormBuilderInterface $parent = null); /** * Returns a form for a property of a class. @@ -64,7 +64,7 @@ interface FormFactoryInterface * * @throws Exception\FormException if any given option is not applicable to the form type */ - function createForProperty($class, $property, $data = null, array $options = array(), FormBuilderInterface $parent = null); + public function createForProperty($class, $property, $data = null, array $options = array(), FormBuilderInterface $parent = null); /** * Returns a form builder. @@ -78,7 +78,7 @@ interface FormFactoryInterface * * @throws Exception\FormException if any given option is not applicable to the given type */ - function createBuilder($type, $data = null, array $options = array(), FormBuilderInterface $parent = null); + public function createBuilder($type, $data = null, array $options = array(), FormBuilderInterface $parent = null); /** * Returns a form builder. @@ -93,7 +93,7 @@ interface FormFactoryInterface * * @throws Exception\FormException if any given option is not applicable to the given type */ - function createNamedBuilder($name, $type, $data = null, array $options = array(), FormBuilderInterface $parent = null); + public function createNamedBuilder($name, $type, $data = null, array $options = array(), FormBuilderInterface $parent = null); /** * Returns a form builder for a property of a class. @@ -111,7 +111,7 @@ interface FormFactoryInterface * * @throws Exception\FormException if any given option is not applicable to the form type */ - function createBuilderForProperty($class, $property, $data = null, array $options = array(), FormBuilderInterface $parent = null); + public function createBuilderForProperty($class, $property, $data = null, array $options = array(), FormBuilderInterface $parent = null); /** * Returns a type by name. @@ -124,7 +124,7 @@ interface FormFactoryInterface * * @throws Exception\FormException if the type can not be retrieved from any extension */ - function getType($name); + public function getType($name); /** * Returns whether the given type is supported. @@ -133,12 +133,12 @@ interface FormFactoryInterface * * @return Boolean Whether the type is supported */ - function hasType($name); + public function hasType($name); /** * Adds a type. * * @param FormTypeInterface $type The type */ - function addType(FormTypeInterface $type); + public function addType(FormTypeInterface $type); } diff --git a/src/Symfony/Component/Form/FormInterface.php b/src/Symfony/Component/Form/FormInterface.php index e74dcbf7ed..b6dd1c1b98 100644 --- a/src/Symfony/Component/Form/FormInterface.php +++ b/src/Symfony/Component/Form/FormInterface.php @@ -25,21 +25,21 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormInterface The form instance */ - function setParent(FormInterface $parent = null); + public function setParent(FormInterface $parent = null); /** * Returns the parent form. * * @return FormInterface The parent form */ - function getParent(); + public function getParent(); /** * Returns whether the form has a parent. * * @return Boolean */ - function hasParent(); + public function hasParent(); /** * Adds a child to the form. @@ -48,7 +48,7 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormInterface The form instance */ - function add(FormInterface $child); + public function add(FormInterface $child); /** * Returns the child with the given name. @@ -57,7 +57,7 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormInterface The child form */ - function get($name); + public function get($name); /** * Returns whether a child with the given name exists. @@ -66,7 +66,7 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * * @return Boolean */ - function has($name); + public function has($name); /** * Removes a child from the form. @@ -75,21 +75,21 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormInterface The form instance */ - function remove($name); + public function remove($name); /** * Returns all children in this group. * * @return array An array of FormInterface instances */ - function all(); + public function all(); /** * Returns all errors. * * @return array An array of FormError instances that occurred during binding */ - function getErrors(); + public function getErrors(); /** * Updates the field with default data. @@ -98,14 +98,14 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormInterface The form instance */ - function setData($modelData); + public function setData($modelData); /** * Returns the data in the format needed for the underlying object. * * @return mixed */ - function getData(); + public function getData(); /** * Returns the normalized data of the field. @@ -114,49 +114,49 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * When the field is bound, the normalized bound data is * returned if the field is valid, null otherwise. */ - function getNormData(); + public function getNormData(); /** * Returns the data transformed by the value transformer. * * @return string */ - function getViewData(); + public function getViewData(); /** * Returns the extra data. * * @return array The bound data which do not belong to a child */ - function getExtraData(); + public function getExtraData(); /** * Returns the form's configuration. * * @return FormConfigInterface The configuration. */ - function getConfig(); + public function getConfig(); /** * Returns whether the field is bound. * * @return Boolean true if the form is bound to input values, false otherwise */ - function isBound(); + public function isBound(); /** * Returns the name by which the form is identified in forms. * * @return string The name of the form. */ - function getName(); + public function getName(); /** * Returns the property path that the form is mapped to. * * @return Util\PropertyPath The property path. */ - function getPropertyPath(); + public function getPropertyPath(); /** * Adds an error to this form. @@ -165,14 +165,14 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormInterface The form instance */ - function addError(FormError $error); + public function addError(FormError $error); /** * Returns whether the form is valid. * * @return Boolean */ - function isValid(); + public function isValid(); /** * Returns whether the form is required to be filled out. @@ -183,7 +183,7 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * * @return Boolean */ - function isRequired(); + public function isRequired(); /** * Returns whether this form is disabled. @@ -196,21 +196,21 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * * @return Boolean */ - function isDisabled(); + public function isDisabled(); /** * Returns whether the form is empty. * * @return Boolean */ - function isEmpty(); + public function isEmpty(); /** * Returns whether the data in the different formats is synchronized. * * @return Boolean */ - function isSynchronized(); + public function isSynchronized(); /** * Writes data into the form. @@ -219,21 +219,21 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormInterface The form instance */ - function bind($data); + public function bind($data); /** * Returns the root of the form tree. * * @return FormInterface The root of the tree */ - function getRoot(); + public function getRoot(); /** * Returns whether the field is the root of the form tree. * * @return Boolean */ - function isRoot(); + public function isRoot(); /** * Creates a view. @@ -242,5 +242,5 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormViewInterface The view */ - function createView(FormViewInterface $parent = null); + public function createView(FormViewInterface $parent = null); } diff --git a/src/Symfony/Component/Form/FormTypeExtensionInterface.php b/src/Symfony/Component/Form/FormTypeExtensionInterface.php index b83cf02268..2cbfc28f9b 100644 --- a/src/Symfony/Component/Form/FormTypeExtensionInterface.php +++ b/src/Symfony/Component/Form/FormTypeExtensionInterface.php @@ -29,7 +29,7 @@ interface FormTypeExtensionInterface * @param FormBuilderInterface $builder The form builder * @param array $options The options */ - function buildForm(FormBuilderInterface $builder, array $options); + public function buildForm(FormBuilderInterface $builder, array $options); /** * Builds the view. @@ -43,7 +43,7 @@ interface FormTypeExtensionInterface * @param FormInterface $form The form * @param array $options The options */ - function buildView(FormViewInterface $view, FormInterface $form, array $options); + public function buildView(FormViewInterface $view, FormInterface $form, array $options); /** * Finishes the view. @@ -57,19 +57,19 @@ interface FormTypeExtensionInterface * @param FormInterface $form The form * @param array $options The options */ - function finishView(FormViewInterface $view, FormInterface $form, array $options); + public function finishView(FormViewInterface $view, FormInterface $form, array $options); /** * Overrides the default options from the extended type. * * @param OptionsResolverInterface $resolver The resolver for the options. */ - function setDefaultOptions(OptionsResolverInterface $resolver); + public function setDefaultOptions(OptionsResolverInterface $resolver); /** * Returns the name of the type being extended. * * @return string The name of the type being extended */ - function getExtendedType(); + public function getExtendedType(); } diff --git a/src/Symfony/Component/Form/FormTypeGuesserInterface.php b/src/Symfony/Component/Form/FormTypeGuesserInterface.php index 5750336020..d5b570f33c 100644 --- a/src/Symfony/Component/Form/FormTypeGuesserInterface.php +++ b/src/Symfony/Component/Form/FormTypeGuesserInterface.php @@ -24,7 +24,7 @@ interface FormTypeGuesserInterface * * @return Guess\TypeGuess A guess for the field's type and options */ - function guessType($class, $property); + public function guessType($class, $property); /** * Returns a guess whether a property of a class is required @@ -34,7 +34,7 @@ interface FormTypeGuesserInterface * * @return Guess\Guess A guess for the field's required setting */ - function guessRequired($class, $property); + public function guessRequired($class, $property); /** * Returns a guess about the field's maximum length @@ -44,7 +44,7 @@ interface FormTypeGuesserInterface * * @return Guess\Guess A guess for the field's maximum length */ - function guessMaxLength($class, $property); + public function guessMaxLength($class, $property); /** * Returns a guess about the field's minimum length @@ -56,7 +56,7 @@ interface FormTypeGuesserInterface * * @deprecated Deprecated since version 2.1, to be removed in 2.3. */ - function guessMinLength($class, $property); + public function guessMinLength($class, $property); /** * Returns a guess about the field's pattern @@ -72,5 +72,5 @@ interface FormTypeGuesserInterface * * @return Guess\Guess A guess for the field's required pattern */ - function guessPattern($class, $property); + public function guessPattern($class, $property); } diff --git a/src/Symfony/Component/Form/FormTypeInterface.php b/src/Symfony/Component/Form/FormTypeInterface.php index 22f874c156..0e5d20d723 100644 --- a/src/Symfony/Component/Form/FormTypeInterface.php +++ b/src/Symfony/Component/Form/FormTypeInterface.php @@ -29,7 +29,7 @@ interface FormTypeInterface * @param FormBuilderInterface $builder The form builder * @param array $options The options */ - function buildForm(FormBuilderInterface $builder, array $options); + public function buildForm(FormBuilderInterface $builder, array $options); /** * Builds the form view. @@ -47,7 +47,7 @@ interface FormTypeInterface * @param FormInterface $form The form * @param array $options The options */ - function buildView(FormViewInterface $view, FormInterface $form, array $options); + public function buildView(FormViewInterface $view, FormInterface $form, array $options); /** * Finishes the form view. @@ -66,7 +66,7 @@ interface FormTypeInterface * @param FormInterface $form The form * @param array $options The options */ - function finishView(FormViewInterface $view, FormInterface $form, array $options); + public function finishView(FormViewInterface $view, FormInterface $form, array $options); /** * Returns a builder for the current type. @@ -80,28 +80,28 @@ interface FormTypeInterface * * @return FormBuilderInterface|null A form builder or null when the type does not have a builder */ - function createBuilder($name, FormFactoryInterface $factory, array $options); + public function createBuilder($name, FormFactoryInterface $factory, array $options); /** * Sets the default options for this type. * * @param OptionsResolverInterface $resolver The resolver for the options. */ - function setDefaultOptions(OptionsResolverInterface $resolver); + public function setDefaultOptions(OptionsResolverInterface $resolver); /** * Returns the name of the parent type. * * @return string|null The name of the parent type if any, null otherwise. */ - function getParent(); + public function getParent(); /** * Returns the name of this type. * * @return string The name of this type */ - function getName(); + public function getName(); /** * Sets the extensions for this type. @@ -110,12 +110,12 @@ interface FormTypeInterface * * @throws Exception\UnexpectedTypeException if any extension does not implement FormTypeExtensionInterface */ - function setExtensions(array $extensions); + public function setExtensions(array $extensions); /** * Returns the extensions associated with this type. * * @return array An array of FormTypeExtensionInterface */ - function getExtensions(); + public function getExtensions(); } diff --git a/src/Symfony/Component/Form/FormValidatorInterface.php b/src/Symfony/Component/Form/FormValidatorInterface.php index 6fa541b6ab..2fdd51f831 100644 --- a/src/Symfony/Component/Form/FormValidatorInterface.php +++ b/src/Symfony/Component/Form/FormValidatorInterface.php @@ -24,5 +24,5 @@ interface FormValidatorInterface /** * @deprecated Deprecated since version 2.1, to be removed in 2.3. */ - function validate(FormInterface $form); + public function validate(FormInterface $form); } diff --git a/src/Symfony/Component/Form/FormViewInterface.php b/src/Symfony/Component/Form/FormViewInterface.php index 1e71aba064..bee156f62a 100644 --- a/src/Symfony/Component/Form/FormViewInterface.php +++ b/src/Symfony/Component/Form/FormViewInterface.php @@ -21,21 +21,21 @@ interface FormViewInterface extends \ArrayAccess, \Traversable, \Countable * * @return string The form name. */ - function getName(); + public function getName(); /** * Returns whether the view was already rendered. * * @return Boolean Whether this view's widget is rendered. */ - function isRendered(); + public function isRendered(); /** * Marks the view as rendered. * * @return FormViewInterface The view object. */ - function setRendered(); + public function setRendered(); /** * Sets the parent view. @@ -44,21 +44,21 @@ interface FormViewInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormViewInterface The view object. */ - function setParent(FormViewInterface $parent = null); + public function setParent(FormViewInterface $parent = null); /** * Returns the parent view. * * @return FormViewInterface The parent view. */ - function getParent(); + public function getParent(); /** * Returns whether this view has a parent. * * @return Boolean Whether this view has a parent */ - function hasParent(); + public function hasParent(); /** * Adds a child view. @@ -67,7 +67,7 @@ interface FormViewInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormViewInterface The view object. */ - function add(FormViewInterface $child); + public function add(FormViewInterface $child); /** * Removes a child view. @@ -76,14 +76,14 @@ interface FormViewInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormViewInterface The view object. */ - function remove($name); + public function remove($name); /** * Returns the children. * * @return array The children as instances of FormView */ - function all(); + public function all(); /** * Returns a given child. @@ -92,7 +92,7 @@ interface FormViewInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormViewInterface The child view */ - function get($name); + public function get($name); /** * Returns whether this view has a given child. @@ -101,7 +101,7 @@ interface FormViewInterface extends \ArrayAccess, \Traversable, \Countable * * @return Boolean Whether the child with the given name exists */ - function has($name); + public function has($name); /** * Sets a view variable. @@ -111,7 +111,7 @@ interface FormViewInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormViewInterface The view object. */ - function setVar($name, $value); + public function setVar($name, $value); /** * Adds a list of view variables. @@ -120,7 +120,7 @@ interface FormViewInterface extends \ArrayAccess, \Traversable, \Countable * * @return FormViewInterface The view object. */ - function addVars(array $values); + public function addVars(array $values); /** * Returns whether a view variable exists. @@ -129,7 +129,7 @@ interface FormViewInterface extends \ArrayAccess, \Traversable, \Countable * * @return Boolean Whether the variable exists. */ - function hasVar($name); + public function hasVar($name); /** * Returns the value of a view variable. @@ -139,12 +139,12 @@ interface FormViewInterface extends \ArrayAccess, \Traversable, \Countable * * @return mixed The variable value. */ - function getVar($name, $default = null); + public function getVar($name, $default = null); /** * Returns the values of all view variables. * * @return array The values of all variables. */ - function getVars(); + public function getVars(); } diff --git a/src/Symfony/Component/Form/Guess/Guess.php b/src/Symfony/Component/Form/Guess/Guess.php index 800617a6d2..c964ec26a8 100644 --- a/src/Symfony/Component/Form/Guess/Guess.php +++ b/src/Symfony/Component/Form/Guess/Guess.php @@ -77,7 +77,7 @@ abstract class Guess * * @return Guess The guess with the highest confidence */ - static public function getBestGuess(array $guesses) + public static function getBestGuess(array $guesses) { usort($guesses, function ($a, $b) { return $b->getConfidence() - $a->getConfidence(); diff --git a/src/Symfony/Component/Form/Tests/AbstractFormTest.php b/src/Symfony/Component/Form/Tests/AbstractFormTest.php index 6b2ca65540..b4a2477368 100644 --- a/src/Symfony/Component/Form/Tests/AbstractFormTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractFormTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Form\Tests; -use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormBuilder; use Symfony\Component\EventDispatcher\EventDispatcherInterface; diff --git a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php index 874e8850c2..fe123f3c0f 100644 --- a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php @@ -377,7 +377,6 @@ abstract class AbstractLayoutTest extends \PHPUnit_Framework_TestCase ); } - public function testSingleChoiceWithPreferredAndNoSeparator() { $form = $this->factory->createNamed('name', 'choice', '&a', array( diff --git a/src/Symfony/Component/Form/Tests/CompoundFormTest.php b/src/Symfony/Component/Form/Tests/CompoundFormTest.php index a5f4261f43..be36f88895 100644 --- a/src/Symfony/Component/Form/Tests/CompoundFormTest.php +++ b/src/Symfony/Component/Form/Tests/CompoundFormTest.php @@ -12,18 +12,12 @@ namespace Symfony\Component\Form\Tests; use Symfony\Component\Form\Form; -use Symfony\Component\Form\Util\PropertyPath; -use Symfony\Component\Form\FormConfig; use Symfony\Component\Form\FormView; -use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\FormError; -use Symfony\Component\Form\Exception\TransformationFailedException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Form\Tests\Fixtures\FixedDataTransformer; -use Symfony\Component\Form\Tests\Fixtures\FixedFilterListener; class FormTest extends AbstractFormTest { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php index 822cbcf2f3..0a4c8b8062 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Form\Tests\Extension\Core\DataMapper; -use Symfony\Component\Form\Tests\FormInterface; use Symfony\Component\Form\Form; use Symfony\Component\Form\FormConfig; use Symfony\Component\Form\FormConfigInterface; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php index d744e1bb30..82234d28ba 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php @@ -105,12 +105,12 @@ class DateTimeToArrayTransformerTest extends DateTimeTestCase $dateTime = new \DateTime('2010-02-03 04:05:06 America/New_York'); $dateTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); $output = array( - 'year' => (string)(int)$dateTime->format('Y'), - 'month' => (string)(int)$dateTime->format('m'), - 'day' => (string)(int)$dateTime->format('d'), - 'hour' => (string)(int)$dateTime->format('H'), - 'minute' => (string)(int)$dateTime->format('i'), - 'second' => (string)(int)$dateTime->format('s'), + 'year' => (string) (int) $dateTime->format('Y'), + 'month' => (string) (int) $dateTime->format('m'), + 'day' => (string) (int) $dateTime->format('d'), + 'hour' => (string) (int) $dateTime->format('H'), + 'minute' => (string) (int) $dateTime->format('i'), + 'second' => (string) (int) $dateTime->format('s'), ); $this->assertSame($output, $transformer->transform($input)); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php index 478c9a564e..be7b3d47f8 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; use Symfony\Component\Form\Extension\Core\DataTransformer\MoneyToLocalizedStringTransformer; - class MoneyToLocalizedStringTransformerTest extends LocalizedTestCase { protected function setUp() diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php index c156b9ec2a..78a0c01fac 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Form\Tests\Extension\Core\EventListener; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\Extension\Core\EventListener\MergeCollectionListener; -use Symfony\Component\Form\FormBuilder; abstract class MergeCollectionListenerTest extends \PHPUnit_Framework_TestCase { 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 9fe68784d2..1c1f3c08f2 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php @@ -61,7 +61,6 @@ class ChoiceTypeTest extends TypeTestCase ); } - protected function tearDown() { parent::tearDown(); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php index 9c7cbe6a6f..64bd4299f6 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; -use Symfony\Component\Form\FormError; - class DateTimeTypeTest extends LocalizedTestCase { public function testSubmit_dateTime() @@ -140,14 +138,14 @@ class DateTimeTypeTest extends LocalizedTestCase $form->bind(array( 'date' => array( - 'day' => (int)$dateTime->format('d'), - 'month' => (int)$dateTime->format('m'), - 'year' => (int)$dateTime->format('Y'), + 'day' => (int) $dateTime->format('d'), + 'month' => (int) $dateTime->format('m'), + 'year' => (int) $dateTime->format('Y'), ), 'time' => array( - 'hour' => (int)$dateTime->format('H'), - 'minute' => (int)$dateTime->format('i'), - 'second' => (int)$dateTime->format('s'), + 'hour' => (int) $dateTime->format('H'), + 'minute' => (int) $dateTime->format('i'), + 'second' => (int) $dateTime->format('s'), ), )); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php index 2dd30ecc07..705a64a943 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; use Symfony\Component\Form\Extension\Core\View\ChoiceView; -use Symfony\Component\Form\FormError; class DateTypeTest extends LocalizedTestCase { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php index 7abe8f7d28..7db1e843d5 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; - class PasswordTypeTest extends TypeTestCase { public function testEmptyIfNotBound() 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 d99313206b..1c0cf3c6f0 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; - class RepeatedTypeTest extends TypeTestCase { protected $form; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php index 1342535ede..ad26b6281c 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php @@ -199,9 +199,9 @@ class TimeTypeTest extends LocalizedTestCase $outputTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); $displayedData = array( - 'hour' => (int)$outputTime->format('H'), - 'minute' => (int)$outputTime->format('i'), - 'second' => (int)$outputTime->format('s') + 'hour' => (int) $outputTime->format('H'), + 'minute' => (int) $outputTime->format('i'), + 'second' => (int) $outputTime->format('s') ); $this->assertEquals($displayedData, $form->getViewData()); @@ -225,9 +225,9 @@ class TimeTypeTest extends LocalizedTestCase $outputTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); $displayedData = array( - 'hour' => (int)$outputTime->format('H'), - 'minute' => (int)$outputTime->format('i'), - 'second' => (int)$outputTime->format('s') + 'hour' => (int) $outputTime->format('H'), + 'minute' => (int) $outputTime->format('i'), + 'second' => (int) $outputTime->format('s') ); $this->assertDateTimeEquals($dateTime, $form->getData()); diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php index 73885882d1..bdb6f7efae 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php @@ -428,7 +428,6 @@ class FormValidatorTest extends \PHPUnit_Framework_TestCase $this->assertEquals('Extra!', $context->getViolations()->get(0)->getMessage()); } - /** * @dataProvider getPostMaxSizeFixtures */ diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php index e9212f5914..69dd6fa9b2 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php @@ -18,10 +18,7 @@ use Symfony\Component\Form\FormError; use Symfony\Component\Form\Util\PropertyPath; use Symfony\Component\Form\Extension\Validator\Constraints\Form; use Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener; -use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintViolation; -use Symfony\Component\Validator\GlobalExecutionContext; -use Symfony\Component\Validator\ExecutionContext; class ValidationListenerTest extends \PHPUnit_Framework_TestCase { diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php index 11703b3b66..03872b23d7 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php @@ -18,7 +18,6 @@ use Symfony\Component\Form\Form; use Symfony\Component\Form\FormConfig; use Symfony\Component\Form\FormError; use Symfony\Component\Form\Util\PropertyPath; -use Symfony\Component\Form\FormBuilder; use Symfony\Component\Validator\ConstraintViolation; /** diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php index db64e9cd69..02df8f43eb 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php @@ -243,4 +243,3 @@ class ViolationPathTest extends \PHPUnit_Framework_TestCase $path->mapsForm(-1); } } - diff --git a/src/Symfony/Component/Form/Tests/SimpleFormTest.php b/src/Symfony/Component/Form/Tests/SimpleFormTest.php index 36810dc742..26640d77b2 100644 --- a/src/Symfony/Component/Form/Tests/SimpleFormTest.php +++ b/src/Symfony/Component/Form/Tests/SimpleFormTest.php @@ -15,13 +15,9 @@ use Symfony\Component\Form\Form; use Symfony\Component\Form\Util\PropertyPath; use Symfony\Component\Form\FormConfig; use Symfony\Component\Form\FormView; -use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\FormError; use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Form\Tests\Fixtures\FixedDataTransformer; use Symfony\Component\Form\Tests\Fixtures\FixedFilterListener; diff --git a/src/Symfony/Component/Form/UnmodifiableFormConfig.php b/src/Symfony/Component/Form/UnmodifiableFormConfig.php index 76af017b3a..448f325bcc 100644 --- a/src/Symfony/Component/Form/UnmodifiableFormConfig.php +++ b/src/Symfony/Component/Form/UnmodifiableFormConfig.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Form; -use Symfony\Component\Form\Exception\UnexpectedTypeException; use Symfony\Component\Form\Util\PropertyPath; use Symfony\Component\EventDispatcher\UnmodifiableEventDispatcher; @@ -130,7 +129,7 @@ class UnmodifiableFormConfig implements FormConfigInterface public function __construct(FormConfigInterface $config) { $dispatcher = $config->getEventDispatcher(); - if (!$dispatcher instanceof UnmodifiableEventDispatcher) { + if (!$dispatcher instanceof UnmodifiableEventDispatcher) { $dispatcher = new UnmodifiableEventDispatcher($dispatcher); } diff --git a/src/Symfony/Component/Form/Util/FormUtil.php b/src/Symfony/Component/Form/Util/FormUtil.php index 868dab9610..cf7d4d792c 100644 --- a/src/Symfony/Component/Form/Util/FormUtil.php +++ b/src/Symfony/Component/Form/Util/FormUtil.php @@ -34,7 +34,7 @@ abstract class FormUtil * @see http://english-zone.com/spelling/plurals.html * @see http://www.scribd.com/doc/3271143/List-of-100-Irregular-Plural-Nouns-in-English */ - static private $pluralMap = array( + private static $pluralMap = array( // First entry: plural suffix, reversed // Second entry: length of plural suffix // Third entry: Whether the suffix may succeed a vocal @@ -117,7 +117,7 @@ abstract class FormUtil * @return string|array The singular form or an array of possible singular * forms */ - static public function singularify($plural) + public static function singularify($plural) { $pluralRev = strrev($plural); $lowerPluralRev = strtolower($pluralRev); @@ -198,7 +198,7 @@ abstract class FormUtil * * @return Boolean Whether the choice is a group */ - static public function isChoiceGroup($choice) + public static function isChoiceGroup($choice) { return is_array($choice) || $choice instanceof \Traversable; } @@ -211,7 +211,7 @@ abstract class FormUtil * * @return Boolean Whether the choice is selected */ - static public function isChoiceSelected($choice, $value) + public static function isChoiceSelected($choice, $value) { if (is_array($value)) { return false !== array_search($choice, $value, true); @@ -231,7 +231,7 @@ abstract class FormUtil * * @return Boolean */ - static public function isEmpty($data) + public static function isEmpty($data) { // Should not do a check for array() === $data!!! // This method is used in occurrences where arrays are diff --git a/src/Symfony/Component/Form/Util/PropertyPathInterface.php b/src/Symfony/Component/Form/Util/PropertyPathInterface.php index 8231ce7307..ee0923c7bb 100644 --- a/src/Symfony/Component/Form/Util/PropertyPathInterface.php +++ b/src/Symfony/Component/Form/Util/PropertyPathInterface.php @@ -21,7 +21,7 @@ interface PropertyPathInterface extends \Traversable * * @return string The path as string. */ - function __toString(); + public function __toString(); /** * Returns the positions at which the elements of the path @@ -29,14 +29,14 @@ interface PropertyPathInterface extends \Traversable * * @return array The string offsets of the elements. */ - function getPositions(); + public function getPositions(); /** * Returns the length of the property path. * * @return integer The path length. */ - function getLength(); + public function getLength(); /** * Returns the parent property path. @@ -48,14 +48,14 @@ interface PropertyPathInterface extends \Traversable * * @return PropertyPath The parent path or null. */ - function getParent(); + public function getParent(); /** * Returns the elements of the property path as array * * @return array An array of property/index names */ - function getElements(); + public function getElements(); /** * Returns the element at the given index in the property path @@ -66,7 +66,7 @@ interface PropertyPathInterface extends \Traversable * * @throws \OutOfBoundsException If the offset is invalid. */ - function getElement($index); + public function getElement($index); /** * Returns whether the element at the given index is a property @@ -77,7 +77,7 @@ interface PropertyPathInterface extends \Traversable * * @throws \OutOfBoundsException If the offset is invalid. */ - function isProperty($index); + public function isProperty($index); /** * Returns whether the element at the given index is an array index @@ -88,5 +88,5 @@ interface PropertyPathInterface extends \Traversable * * @throws \OutOfBoundsException If the offset is invalid. */ - function isIndex($index); + public function isIndex($index); } diff --git a/src/Symfony/Component/Form/Util/PropertyPathIteratorInterface.php b/src/Symfony/Component/Form/Util/PropertyPathIteratorInterface.php index 639164a213..35fb11ad73 100644 --- a/src/Symfony/Component/Form/Util/PropertyPathIteratorInterface.php +++ b/src/Symfony/Component/Form/Util/PropertyPathIteratorInterface.php @@ -22,7 +22,7 @@ interface PropertyPathIteratorInterface extends \Iterator, \SeekableIterator * * @return Boolean */ - function isIndex(); + public function isIndex(); /** * Returns whether the current element in the property path is a property @@ -30,5 +30,5 @@ interface PropertyPathIteratorInterface extends \Iterator, \SeekableIterator * * @return Boolean */ - function isProperty(); + public function isProperty(); } diff --git a/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php b/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php index 2eb3924085..d5715f6f55 100644 --- a/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php +++ b/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php @@ -33,7 +33,7 @@ class ExtensionGuesser implements ExtensionGuesserInterface * * @var ExtensionGuesser */ - static private $instance = null; + private static $instance = null; /** * All registered ExtensionGuesserInterface instances @@ -47,7 +47,7 @@ class ExtensionGuesser implements ExtensionGuesserInterface * * @return ExtensionGuesser */ - static public function getInstance() + public static function getInstance() { if (null === self::$instance) { self::$instance = new self(); diff --git a/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php b/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php index 7d892c014b..8373696976 100644 --- a/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php +++ b/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php @@ -22,5 +22,5 @@ interface ExtensionGuesserInterface * @param string $mimeType The mime type * @return string The guessed extension or NULL, if none could be guessed */ - function guess($mimeType); + public function guess($mimeType); } diff --git a/src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php b/src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php index 96895e82ae..3da63dd483 100644 --- a/src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php +++ b/src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php @@ -43,7 +43,7 @@ class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface * * @return Boolean */ - static public function isSupported() + public static function isSupported() { return !defined('PHP_WINDOWS_VERSION_BUILD'); } diff --git a/src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php b/src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php index 8efb3a2e21..09a0d7ed19 100644 --- a/src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php +++ b/src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php @@ -26,7 +26,7 @@ class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface * * @return Boolean */ - static public function isSupported() + public static function isSupported() { return function_exists('finfo_open'); } diff --git a/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php b/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php index d8d9d36a05..15b89a9d60 100644 --- a/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php +++ b/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\File\Mimetype; +namespace Symfony\Component\HttpFoundation\File\MimeType; /** * Provides a best-guess mapping of mime type to file extension. diff --git a/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php b/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php index a3c26177b1..a8247ab46f 100644 --- a/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php +++ b/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php @@ -38,7 +38,7 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface * * @var MimeTypeGuesser */ - static private $instance = null; + private static $instance = null; /** * All registered MimeTypeGuesserInterface instances @@ -52,7 +52,7 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface * * @return MimeTypeGuesser */ - static public function getInstance() + public static function getInstance() { if (null === self::$instance) { self::$instance = new self(); diff --git a/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php b/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php index 2cd9902b27..87ea20ff6f 100644 --- a/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php +++ b/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php @@ -31,5 +31,5 @@ interface MimeTypeGuesserInterface * @throws FileNotFoundException If the file does not exist * @throws AccessDeniedException If the file could not be read */ - function guess($path); + public function guess($path); } diff --git a/src/Symfony/Component/HttpFoundation/File/UploadedFile.php b/src/Symfony/Component/HttpFoundation/File/UploadedFile.php index 077c0df0b4..6d6dda1bb1 100644 --- a/src/Symfony/Component/HttpFoundation/File/UploadedFile.php +++ b/src/Symfony/Component/HttpFoundation/File/UploadedFile.php @@ -201,7 +201,7 @@ class UploadedFile extends File * * @return int The maximum size of an uploaded file in bytes */ - static public function getMaxFilesize() + public static function getMaxFilesize() { $max = trim(ini_get('upload_max_filesize')); diff --git a/src/Symfony/Component/HttpFoundation/FileBag.php b/src/Symfony/Component/HttpFoundation/FileBag.php index 799a8ed6d8..b2775efb2f 100644 --- a/src/Symfony/Component/HttpFoundation/FileBag.php +++ b/src/Symfony/Component/HttpFoundation/FileBag.php @@ -23,7 +23,7 @@ use Symfony\Component\HttpFoundation\File\UploadedFile; */ class FileBag extends ParameterBag { - static private $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type'); + private static $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type'); /** * Constructor. diff --git a/src/Symfony/Component/HttpFoundation/JsonResponse.php b/src/Symfony/Component/HttpFoundation/JsonResponse.php index 734628ffe8..331ff400f7 100644 --- a/src/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/src/Symfony/Component/HttpFoundation/JsonResponse.php @@ -38,7 +38,7 @@ class JsonResponse extends Response /** * {@inheritDoc} */ - static public function create($data = array(), $status = 200, $headers = array()) + public static function create($data = array(), $status = 200, $headers = array()) { return new static($data, $status, $headers); } diff --git a/src/Symfony/Component/HttpFoundation/RedirectResponse.php b/src/Symfony/Component/HttpFoundation/RedirectResponse.php index 27676ec0d5..f2e854ea96 100644 --- a/src/Symfony/Component/HttpFoundation/RedirectResponse.php +++ b/src/Symfony/Component/HttpFoundation/RedirectResponse.php @@ -66,7 +66,7 @@ class RedirectResponse extends Response /** * {@inheritDoc} */ - static public function create($url = '', $status = 302, $headers = array()) + public static function create($url = '', $status = 302, $headers = array()) { return new static($url, $status, $headers); } diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 1cf8e0f3f5..44d2b22bb9 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -30,7 +30,7 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface; */ class Request { - static protected $trustProxy = false; + protected static $trustProxy = false; /** * @var \Symfony\Component\HttpFoundation\ParameterBag @@ -149,7 +149,7 @@ class Request /** * @var array */ - static protected $formats; + protected static $formats; /** * Constructor. @@ -213,7 +213,7 @@ class Request * * @api */ - static public function createFromGlobals() + public static function createFromGlobals() { $request = new static($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER); @@ -242,7 +242,7 @@ class Request * * @api */ - static public function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null) + public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null) { $defaults = array( 'SERVER_NAME' => 'localhost', @@ -444,7 +444,7 @@ class Request * * @api */ - static public function trustProxyData() + public static function trustProxyData() { self::$trustProxy = true; } @@ -455,7 +455,7 @@ class Request * * @return boolean */ - static public function isProxyTrusted() + public static function isProxyTrusted() { return self::$trustProxy; } @@ -470,7 +470,7 @@ class Request * * @return string A normalized query string for the Request */ - static public function normalizeQueryString($qs) + public static function normalizeQueryString($qs) { if ('' == $qs) { return ''; @@ -848,6 +848,7 @@ class Request public function getQueryString() { $qs = static::normalizeQueryString($this->server->get('QUERY_STRING')); + return '' === $qs ? null : $qs; } @@ -1454,7 +1455,7 @@ class Request /** * Initializes HTTP request formats. */ - static protected function initializeFormats() + protected static function initializeFormats() { static::$formats = array( 'html' => array('text/html', 'application/xhtml+xml'), diff --git a/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php b/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php index 0ee161c884..695fd21788 100644 --- a/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php +++ b/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php @@ -29,5 +29,5 @@ interface RequestMatcherInterface * * @api */ - function matches(Request $request); + public function matches(Request $request); } diff --git a/src/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php b/src/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php index 11fcf3bc18..1d2106e2a1 100644 --- a/src/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php +++ b/src/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php @@ -36,7 +36,7 @@ interface SessionHandlerInterface * * @return boolean */ - function open($savePath, $sessionName); + public function open($savePath, $sessionName); /** * Close session. @@ -45,7 +45,7 @@ interface SessionHandlerInterface * * @return boolean */ - function close(); + public function close(); /** * Read session. @@ -56,7 +56,7 @@ interface SessionHandlerInterface * * @return string String as stored in persistent storage or empty string in all other cases. */ - function read($sessionId); + public function read($sessionId); /** * Commit session to storage. @@ -68,7 +68,7 @@ interface SessionHandlerInterface * * @return boolean */ - function write($sessionId, $data); + public function write($sessionId, $data); /** * Destroys this session. @@ -81,7 +81,7 @@ interface SessionHandlerInterface * * @return boolean */ - function destroy($sessionId); + public function destroy($sessionId); /** * Garbage collection for storage. @@ -94,5 +94,5 @@ interface SessionHandlerInterface * * @return boolean */ - function gc($lifetime); + public function gc($lifetime); } diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index f6b41e2031..e3d58a0b18 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -61,7 +61,7 @@ class Response * * @var array */ - static public $statusTexts = array( + public static $statusTexts = array( 100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', // RFC2518 @@ -158,7 +158,7 @@ class Response * * @return Response */ - static public function create($content = '', $status = 200, $headers = array()) + public static function create($content = '', $status = 200, $headers = array()) { return new static($content, $status, $headers); } diff --git a/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php index ec6d93c025..5f1f37be25 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php @@ -27,7 +27,7 @@ interface AttributeBagInterface extends SessionBagInterface * * @return Boolean true if the attribute is defined, false otherwise */ - function has($name); + public function has($name); /** * Returns an attribute. @@ -37,7 +37,7 @@ interface AttributeBagInterface extends SessionBagInterface * * @return mixed */ - function get($name, $default = null); + public function get($name, $default = null); /** * Sets an attribute. @@ -45,21 +45,21 @@ interface AttributeBagInterface extends SessionBagInterface * @param string $name * @param mixed $value */ - function set($name, $value); + public function set($name, $value); /** * Returns attributes. * * @return array Attributes */ - function all(); + public function all(); /** * Sets attributes. * * @param array $attributes Attributes */ - function replace(array $attributes); + public function replace(array $attributes); /** * Removes an attribute. @@ -68,5 +68,5 @@ interface AttributeBagInterface extends SessionBagInterface * * @return mixed The removed value */ - function remove($name); + public function remove($name); } diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php index b47962fc26..c6e41de62e 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php @@ -93,7 +93,7 @@ class AutoExpireFlashBag implements FlashBagInterface */ public function peekAll() { - return array_key_exists('display', $this->flashes) ? (array)$this->flashes['display'] : array(); + return array_key_exists('display', $this->flashes) ? (array) $this->flashes['display'] : array(); } /** @@ -139,7 +139,7 @@ class AutoExpireFlashBag implements FlashBagInterface */ public function set($type, $messages) { - $this->flashes['new'][$type] = (array)$messages; + $this->flashes['new'][$type] = (array) $messages; } /** diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php index 2fab8bddb8..9ae5a3dd63 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php @@ -26,7 +26,7 @@ interface FlashBagInterface extends SessionBagInterface * @param string $type * @param string $message */ - function add($type, $message); + public function add($type, $message); /** * Registers a message for a given type. @@ -34,7 +34,7 @@ interface FlashBagInterface extends SessionBagInterface * @param string $type * @param string $message */ - function set($type, $message); + public function set($type, $message); /** * Gets flash message for a given type. @@ -44,14 +44,14 @@ interface FlashBagInterface extends SessionBagInterface * * @return string */ - function peek($type, array $default = array()); + public function peek($type, array $default = array()); /** * Gets all flash messages. * * @return array */ - function peekAll(); + public function peekAll(); /** * Gets and clears flash from the stack. @@ -61,19 +61,19 @@ interface FlashBagInterface extends SessionBagInterface * * @return string */ - function get($type, array $default = array()); + public function get($type, array $default = array()); /** * Gets and clears flashes from the stack. * * @return array */ - function all(); + public function all(); /** * Sets all flash messages. */ - function setAll(array $messages); + public function setAll(array $messages); /** * Has flash messages for a given type? @@ -82,12 +82,12 @@ interface FlashBagInterface extends SessionBagInterface * * @return boolean */ - function has($type); + public function has($type); /** * Returns a list of all defined types. * * @return array */ - function keys(); + public function keys(); } diff --git a/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php index 50c2d4bd0c..f8d3d32712 100644 --- a/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php @@ -23,26 +23,26 @@ interface SessionBagInterface * * @return string */ - function getName(); + public function getName(); /** * Initializes the Bag * * @param array $array */ - function initialize(array &$array); + public function initialize(array &$array); /** * Gets the storage key for this bag. * * @return string */ - function getStorageKey(); + public function getStorageKey(); /** * Clears out data from bag. * * @return mixed Whatever data was contained. */ - function clear(); + public function clear(); } diff --git a/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php b/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php index a4d5dccf49..a94fad00d6 100644 --- a/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php @@ -29,7 +29,7 @@ interface SessionInterface * * @api */ - function start(); + public function start(); /** * Returns the session ID. @@ -38,7 +38,7 @@ interface SessionInterface * * @api */ - function getId(); + public function getId(); /** * Sets the session ID @@ -47,7 +47,7 @@ interface SessionInterface * * @api */ - function setId($id); + public function setId($id); /** * Returns the session name. @@ -56,7 +56,7 @@ interface SessionInterface * * @api */ - function getName(); + public function getName(); /** * Sets the session name. @@ -65,7 +65,7 @@ interface SessionInterface * * @api */ - function setName($name); + public function setName($name); /** * Invalidates the current session. @@ -82,7 +82,7 @@ interface SessionInterface * * @api */ - function invalidate($lifetime = null); + public function invalidate($lifetime = null); /** * Migrates the current session to a new session id while maintaining all @@ -98,7 +98,7 @@ interface SessionInterface * * @api */ - function migrate($destroy = false, $lifetime = null); + public function migrate($destroy = false, $lifetime = null); /** * Force the session to be saved and closed. @@ -107,7 +107,7 @@ interface SessionInterface * the session will be automatically saved at the end of * code execution. */ - function save(); + public function save(); /** * Checks if an attribute is defined. @@ -118,7 +118,7 @@ interface SessionInterface * * @api */ - function has($name); + public function has($name); /** * Returns an attribute. @@ -130,7 +130,7 @@ interface SessionInterface * * @api */ - function get($name, $default = null); + public function get($name, $default = null); /** * Sets an attribute. @@ -140,7 +140,7 @@ interface SessionInterface * * @api */ - function set($name, $value); + public function set($name, $value); /** * Returns attributes. @@ -149,14 +149,14 @@ interface SessionInterface * * @api */ - function all(); + public function all(); /** * Sets attributes. * * @param array $attributes Attributes */ - function replace(array $attributes); + public function replace(array $attributes); /** * Removes an attribute. @@ -167,28 +167,28 @@ interface SessionInterface * * @api */ - function remove($name); + public function remove($name); /** * Clears all attributes. * * @api */ - function clear(); + public function clear(); /** * Checks if the session was started. * * @return Boolean */ - function isStarted(); + public function isStarted(); /** * Registers a SessionBagInterface with the session. * * @param SessionBagInterface $bag */ - function registerBag(SessionBagInterface $bag); + public function registerBag(SessionBagInterface $bag); /** * Gets a bag instance by name. @@ -197,12 +197,12 @@ interface SessionInterface * * @return SessionBagInterface */ - function getBag($name); + public function getBag($name); /** * Gets session meta. * * @return MetadataBag */ - function getMetadataBag(); + public function getMetadataBag(); } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php index e925d628df..e1f4fff1fa 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php @@ -42,7 +42,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf */ public function open($savePath, $sessionName) { - $return = (bool)$this->handler->open($savePath, $sessionName); + $return = (bool) $this->handler->open($savePath, $sessionName); if (true === $return) { $this->active = true; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php index 0673d97a14..26a741829b 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php @@ -33,14 +33,14 @@ interface SessionStorageInterface * * @api */ - function start(); + public function start(); /** * Checks if the session is started. * * @return boolean True if started, false otherwise. */ - function isStarted(); + public function isStarted(); /** * Returns the session ID @@ -49,7 +49,7 @@ interface SessionStorageInterface * * @api */ - function getId(); + public function getId(); /** * Sets the session ID @@ -58,7 +58,7 @@ interface SessionStorageInterface * * @api */ - function setId($id); + public function setId($id); /** * Returns the session name @@ -67,7 +67,7 @@ interface SessionStorageInterface * * @api */ - function getName(); + public function getName(); /** * Sets the session name @@ -76,7 +76,7 @@ interface SessionStorageInterface * * @api */ - function setName($name); + public function setName($name); /** * Regenerates id that represents this storage. @@ -101,7 +101,7 @@ interface SessionStorageInterface * * @api */ - function regenerate($destroy = false, $lifetime = null); + public function regenerate($destroy = false, $lifetime = null); /** * Force the session to be saved and closed. @@ -111,12 +111,12 @@ interface SessionStorageInterface * a real PHP session would interfere with testing, in which case it * it should actually persist the session data if required. */ - function save(); + public function save(); /** * Clear all session data in memory. */ - function clear(); + public function clear(); /** * Gets a SessionBagInterface by name. @@ -127,17 +127,17 @@ interface SessionStorageInterface * * @throws \InvalidArgumentException If the bag does not exist */ - function getBag($name); + public function getBag($name); /** * Registers a SessionBagInterface for use. * * @param SessionBagInterface $bag */ - function registerBag(SessionBagInterface $bag); + public function registerBag(SessionBagInterface $bag); /** * @return MetadataBag */ - function getMetadataBag(); + public function getMetadataBag(); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php index f79096f53a..b42a3fc89c 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php @@ -132,7 +132,6 @@ class UploadedFileTest extends \PHPUnit_Framework_TestCase @unlink($targetPath); } - public function testGetClientOriginalNameSanitizeFilename() { $file = new UploadedFile( @@ -207,7 +206,6 @@ class UploadedFileTest extends \PHPUnit_Framework_TestCase $this->assertFalse($file->isValid()); } - public function uploadedFileErrorProvider() { return array( diff --git a/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php index d96e00bef1..c3c0b16bfd 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php @@ -200,7 +200,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array('bang'), $bag->filter('array', '', false), '->filter() gets a value of parameter as an array'); - } /** diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php index 069d8b4af2..e165987267 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php @@ -11,8 +11,6 @@ namespace Symfony\Component\HttpFoundation\Tests; - - use Symfony\Component\HttpFoundation\RequestMatcher; use Symfony\Component\HttpFoundation\Request; diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index 14e01aa969..077e51b76c 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpFoundation\Tests; - use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Request; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php index 3bd702e05c..45a47ce8fa 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php @@ -55,4 +55,3 @@ class NullSessionStorageTest extends \PHPUnit_Framework_TestCase return new NativeSessionStorage(array(), new NullSessionHandler()); } } - diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php index d0938e0d37..ff1565a183 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -61,4 +61,3 @@ class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase $this->assertEquals(0, count($this->pdo->query('SELECT * FROM sessions')->fetchAll())); } } - diff --git a/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php b/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php index 980b8907c5..28138351c8 100644 --- a/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php +++ b/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php @@ -29,14 +29,14 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function boot(); + public function boot(); /** * Shutdowns the Bundle. * * @api */ - function shutdown(); + public function shutdown(); /** * Builds the bundle. @@ -47,7 +47,7 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function build(ContainerBuilder $container); + public function build(ContainerBuilder $container); /** * Returns the container extension that should be implicitly loaded. @@ -56,7 +56,7 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function getContainerExtension(); + public function getContainerExtension(); /** * Returns the bundle parent name. @@ -65,7 +65,7 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function getParent(); + public function getParent(); /** * Returns the bundle name (the class short name). @@ -74,7 +74,7 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function getName(); + public function getName(); /** * Gets the Bundle namespace. @@ -83,7 +83,7 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function getNamespace(); + public function getNamespace(); /** * Gets the Bundle directory path. @@ -94,5 +94,5 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function getPath(); + public function getPath(); } diff --git a/src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php b/src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php index 1588b67607..d4a2db3764 100644 --- a/src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php +++ b/src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php @@ -23,5 +23,5 @@ interface CacheClearerInterface * * @param string $cacheDir The cache directory. */ - function clear($cacheDir); + public function clear($cacheDir); } diff --git a/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php b/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php index 478cdc9943..ed76ce3586 100644 --- a/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php +++ b/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php @@ -28,5 +28,5 @@ interface CacheWarmerInterface extends WarmableInterface * * @return Boolean true if the warmer is optional, false otherwise */ - function isOptional(); + public function isOptional(); } diff --git a/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php b/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php index 0476161621..25d8ee8f61 100644 --- a/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php +++ b/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php @@ -23,5 +23,5 @@ interface WarmableInterface * * @param string $cacheDir The cache directory */ - function warmUp($cacheDir); + public function warmUp($cacheDir); } diff --git a/src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php b/src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php index 986a13dca4..f58f50db53 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php +++ b/src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php @@ -45,7 +45,7 @@ interface ControllerResolverInterface * * @api */ - function getController(Request $request); + public function getController(Request $request); /** * Returns the arguments to pass to the controller. @@ -59,5 +59,5 @@ interface ControllerResolverInterface * * @api */ - function getArguments(Request $request, $controller); + public function getArguments(Request $request, $controller); } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php index 7da36b678d..98eabdb516 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpKernel\DataCollector; - /** * DataCollector. * diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php index 7cfbbd132f..cf4cdfd771 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php @@ -32,7 +32,7 @@ interface DataCollectorInterface * * @api */ - function collect(Request $request, Response $response, \Exception $exception = null); + public function collect(Request $request, Response $response, \Exception $exception = null); /** * Returns the name of the collector. @@ -41,5 +41,5 @@ interface DataCollectorInterface * * @api */ - function getName(); + public function getName(); } diff --git a/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php b/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php index 5ab784dce0..605c08626c 100644 --- a/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php +++ b/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php @@ -39,7 +39,7 @@ class ErrorHandler * * @return The registered error handler */ - static public function register($level = null) + public static function register($level = null) { $handler = new static(); $handler->setLevel($level); diff --git a/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php b/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php index a9da24973a..9dcefc7a12 100644 --- a/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php @@ -45,7 +45,7 @@ class ExceptionHandler * * @return The registered exception handler */ - static public function register($debug = true) + public static function register($debug = true) { $handler = new static($debug); diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php b/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php index 8388ccfd6a..7e036fdf0f 100755 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php @@ -30,7 +30,7 @@ abstract class ConfigurableExtension extends Extension /** * {@inheritDoc} */ - public final function load(array $configs, ContainerBuilder $container) + final public function load(array $configs, ContainerBuilder $container) { $this->loadInternal($this->processConfiguration($this->getConfiguration(array(), $container), $configs), $container); } diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php b/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php index dacd60a991..5c8d5e69ad 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php @@ -96,7 +96,7 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn return Container::underscore($classBaseName); } - protected final function processConfiguration(ConfigurationInterface $configuration, array $configs) + final protected function processConfiguration(ConfigurationInterface $configuration, array $configs) { $processor = new Processor(); diff --git a/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php b/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php index ba67dc1530..1176a73b4d 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php @@ -51,7 +51,7 @@ class EsiListener implements EventSubscriberInterface $this->esi->addSurrogateControl($event->getResponse()); } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( KernelEvents::RESPONSE => 'onKernelResponse', diff --git a/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php b/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php index c7a90e4ef8..512ab08b92 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php @@ -104,7 +104,7 @@ class ExceptionListener implements EventSubscriberInterface $handling = false; } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( KernelEvents::EXCEPTION => array('onKernelException', -128), diff --git a/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php b/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php index 38143ca20d..529314b86d 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php @@ -47,7 +47,7 @@ class LocaleListener implements EventSubscriberInterface } } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( // must be registered after the Router to have access to the _locale diff --git a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php index 83ee82a8d4..0175d2021b 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -134,7 +134,7 @@ class ProfilerListener implements EventSubscriberInterface } } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( // kernel.request must be registered as early as possible to not break diff --git a/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php b/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php index d047b1f159..669980cf2b 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php @@ -50,7 +50,7 @@ class ResponseListener implements EventSubscriberInterface $response->prepare($event->getRequest()); } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( KernelEvents::RESPONSE => 'onKernelResponse', diff --git a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php index 06adebf441..6cccd3707d 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -12,7 +12,6 @@ namespace Symfony\Component\HttpKernel\EventListener; use Symfony\Component\HttpKernel\Log\LoggerInterface; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; @@ -108,7 +107,7 @@ class RouterListener implements EventSubscriberInterface return implode(', ', $pieces); } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( KernelEvents::REQUEST => array(array('onKernelRequest', 32)), diff --git a/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php b/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php index 588c5fe9b1..88505fac6e 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php @@ -43,7 +43,7 @@ class StreamedResponseListener implements EventSubscriberInterface } } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( KernelEvents::RESPONSE => array('onKernelResponse', -1024), diff --git a/src/Symfony/Component/HttpKernel/Exception/FlattenException.php b/src/Symfony/Component/HttpKernel/Exception/FlattenException.php index 16f14535d2..46aba787a9 100644 --- a/src/Symfony/Component/HttpKernel/Exception/FlattenException.php +++ b/src/Symfony/Component/HttpKernel/Exception/FlattenException.php @@ -30,7 +30,7 @@ class FlattenException private $file; private $line; - static public function create(\Exception $exception, $statusCode = null, array $headers = array()) + public static function create(\Exception $exception, $statusCode = null, array $headers = array()) { $e = new static(); $e->setMessage($exception->getMessage()); diff --git a/src/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php b/src/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php index 11102bdb8d..dd4a9dc5a3 100644 --- a/src/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php +++ b/src/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php @@ -23,12 +23,12 @@ interface HttpExceptionInterface * * @return integer An HTTP response status code */ - function getStatusCode(); + public function getStatusCode(); /** * Returns response headers. * * @return array Response headers */ - function getHeaders(); + public function getHeaders(); } diff --git a/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php b/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php index 7b1d38795e..0fb8a12436 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php @@ -30,12 +30,12 @@ interface EsiResponseCacheStrategyInterface * * @param Response $response */ - function add(Response $response); + public function add(Response $response); /** * Updates the Response HTTP headers based on the embedded Responses. * * @param Response $response */ - function update(Response $response); + public function update(Response $response); } diff --git a/src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php b/src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php index 58f8a8c1d9..dd8c886979 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php @@ -31,7 +31,7 @@ interface StoreInterface * * @return Response|null A Response instance, or null if no cache entry was found */ - function lookup(Request $request); + public function lookup(Request $request); /** * Writes a cache entry to the store for the given Request and Response. @@ -44,14 +44,14 @@ interface StoreInterface * * @return string The key under which the response is stored */ - function write(Request $request, Response $response); + public function write(Request $request, Response $response); /** * Invalidates all cache entries that match the request. * * @param Request $request A Request instance */ - function invalidate(Request $request); + public function invalidate(Request $request); /** * Locks the cache for a given Request. @@ -60,14 +60,14 @@ interface StoreInterface * * @return Boolean|string true if the lock is acquired, the path to the current lock otherwise */ - function lock(Request $request); + public function lock(Request $request); /** * Releases the lock for the given Request. * * @param Request $request A Request instance */ - function unlock(Request $request); + public function unlock(Request $request); /** * Purges data for the given URL. @@ -76,10 +76,10 @@ interface StoreInterface * * @return Boolean true if the URL exists and has been purged, false otherwise */ - function purge($url); + public function purge($url); /** * Cleanups storage. */ - function cleanup(); + public function cleanup(); } diff --git a/src/Symfony/Component/HttpKernel/HttpKernelInterface.php b/src/Symfony/Component/HttpKernel/HttpKernelInterface.php index efcf39da91..f49d37ccb1 100644 --- a/src/Symfony/Component/HttpKernel/HttpKernelInterface.php +++ b/src/Symfony/Component/HttpKernel/HttpKernelInterface.php @@ -43,5 +43,5 @@ interface HttpKernelInterface * * @api */ - function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true); + public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true); } diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 5e9a00b4d8..40dc4b0833 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -748,7 +748,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface * * @return string The PHP string with the comments removed */ - static public function stripComments($source) + public static function stripComments($source) { if (!function_exists('token_get_all')) { return $source; diff --git a/src/Symfony/Component/HttpKernel/KernelInterface.php b/src/Symfony/Component/HttpKernel/KernelInterface.php index 3379ee6116..4010a3020e 100644 --- a/src/Symfony/Component/HttpKernel/KernelInterface.php +++ b/src/Symfony/Component/HttpKernel/KernelInterface.php @@ -34,7 +34,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function registerBundles(); + public function registerBundles(); /** * Loads the container configuration @@ -43,14 +43,14 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function registerContainerConfiguration(LoaderInterface $loader); + public function registerContainerConfiguration(LoaderInterface $loader); /** * Boots the current kernel. * * @api */ - function boot(); + public function boot(); /** * Shutdowns the kernel. @@ -59,7 +59,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function shutdown(); + public function shutdown(); /** * Gets the registered bundle instances. @@ -68,7 +68,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function getBundles(); + public function getBundles(); /** * Checks if a given class name belongs to an active bundle. @@ -79,7 +79,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function isClassInActiveBundle($class); + public function isClassInActiveBundle($class); /** * Returns a bundle and optionally its descendants by its name. @@ -93,7 +93,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function getBundle($name, $first = true); + public function getBundle($name, $first = true); /** * Returns the file path for a given resource. @@ -123,7 +123,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function locateResource($name, $dir = null, $first = true); + public function locateResource($name, $dir = null, $first = true); /** * Gets the name of the kernel @@ -132,7 +132,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function getName(); + public function getName(); /** * Gets the environment. @@ -141,7 +141,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function getEnvironment(); + public function getEnvironment(); /** * Checks if debug mode is enabled. @@ -150,7 +150,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function isDebug(); + public function isDebug(); /** * Gets the application root dir. @@ -159,7 +159,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function getRootDir(); + public function getRootDir(); /** * Gets the current container. @@ -168,7 +168,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function getContainer(); + public function getContainer(); /** * Gets the request start time (not available if debug is disabled). @@ -177,7 +177,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function getStartTime(); + public function getStartTime(); /** * Gets the cache directory. @@ -186,7 +186,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function getCacheDir(); + public function getCacheDir(); /** * Gets the log directory. @@ -195,7 +195,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function getLogDir(); + public function getLogDir(); /** * Gets the charset of the application. @@ -204,5 +204,5 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @api */ - function getCharset(); + public function getCharset(); } diff --git a/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php b/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php index 65bb25a864..4442c6398e 100644 --- a/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php +++ b/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php @@ -27,12 +27,12 @@ interface DebugLoggerInterface * * @return array An array of logs */ - function getLogs(); + public function getLogs(); /** * Returns the number of errors. * * @return integer The number of errors */ - function countErrors(); + public function countErrors(); } diff --git a/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php b/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php index 97fe65b912..34847c8098 100644 --- a/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php +++ b/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php @@ -23,40 +23,40 @@ interface LoggerInterface /** * @api */ - function emerg($message, array $context = array()); + public function emerg($message, array $context = array()); /** * @api */ - function alert($message, array $context = array()); + public function alert($message, array $context = array()); /** * @api */ - function crit($message, array $context = array()); + public function crit($message, array $context = array()); /** * @api */ - function err($message, array $context = array()); + public function err($message, array $context = array()); /** * @api */ - function warn($message, array $context = array()); + public function warn($message, array $context = array()); /** * @api */ - function notice($message, array $context = array()); + public function notice($message, array $context = array()); /** * @api */ - function info($message, array $context = array()); + public function info($message, array $context = array()); /** * @api */ - function debug($message, array $context = array()); + public function debug($message, array $context = array()); } diff --git a/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php index 4091232f13..b7bc617690 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php @@ -235,7 +235,7 @@ abstract class PdoProfilerStorage implements ProfilerStorageInterface return $profiles; } - + /** * Returns whether data for the given token already exists in storage. * diff --git a/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php b/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php index db608eaa18..f92d90d87d 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php +++ b/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php @@ -28,7 +28,7 @@ interface ProfilerStorageInterface * * @return array An array of tokens */ - function find($ip, $url, $limit, $method); + public function find($ip, $url, $limit, $method); /** * Reads data associated with the given token. @@ -39,7 +39,7 @@ interface ProfilerStorageInterface * * @return Profile The profile associated with token */ - function read($token); + public function read($token); /** * Saves a Profile. @@ -48,10 +48,10 @@ interface ProfilerStorageInterface * * @return Boolean Write operation successful */ - function write(Profile $profile); + public function write(Profile $profile); /** * Purges all data from the database. */ - function purge(); + public function purge(); } diff --git a/src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php index 70e9c50a01..f59bbc934d 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpKernel\Profiler; - /** * SqliteProfilerStorage stores profiling information in a SQLite database. * diff --git a/src/Symfony/Component/HttpKernel/TerminableInterface.php b/src/Symfony/Component/HttpKernel/TerminableInterface.php index 78a362fe43..fc0e580dfb 100644 --- a/src/Symfony/Component/HttpKernel/TerminableInterface.php +++ b/src/Symfony/Component/HttpKernel/TerminableInterface.php @@ -35,5 +35,5 @@ interface TerminableInterface * * @api */ - function terminate(Request $request, Response $response); + public function terminate(Request $request, Response $response); } diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php index e1ede855e1..594af3247a 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php @@ -162,7 +162,7 @@ class ControllerResolverTest extends \PHPUnit_Framework_TestCase { } - static protected function controllerMethod4() + protected static function controllerMethod4() { } diff --git a/src/Symfony/Component/HttpKernel/Tests/Debug/ContainerAwareTraceableEventDispatcherTest.php b/src/Symfony/Component/HttpKernel/Tests/Debug/ContainerAwareTraceableEventDispatcherTest.php index b126848b76..40c54e56a5 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Debug/ContainerAwareTraceableEventDispatcherTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Debug/ContainerAwareTraceableEventDispatcherTest.php @@ -71,9 +71,9 @@ class ContainerAwareTraceableEventDispatcherTest extends \PHPUnit_Framework_Test class StaticClassFixture { - static public $called = false; + public static $called = false; - static public function staticListener($event) + public static function staticListener($event) { self::$called = true; } diff --git a/src/Symfony/Component/HttpKernel/Tests/Debug/StopwatchTest.php b/src/Symfony/Component/HttpKernel/Tests/Debug/StopwatchTest.php index 76ae5566ff..210acb5959 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Debug/StopwatchTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Debug/StopwatchTest.php @@ -85,7 +85,6 @@ class StopwatchTest extends \PHPUnit_Framework_TestCase $stopwatch->stop('foobar'); $stopwatch->stopSection('0'); - // the section is an event by itself $this->assertCount(3, $stopwatch->getSectionEvents('1')); $this->assertCount(2, $stopwatch->getSectionEvents('2')); diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php index f27737877f..da7ef5bd60 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php +++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php @@ -16,12 +16,12 @@ use Symfony\Component\EventDispatcher\EventDispatcher; class TestEventDispatcher extends EventDispatcher implements TraceableEventDispatcherInterface { - function getCalledListeners() + public function getCalledListeners() { return array('foo'); } - function getNotCalledListeners() + public function getNotCalledListeners() { return array('bar'); } diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php index 3d78c7c8ce..4377f61fbe 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php @@ -154,7 +154,7 @@ class HttpCacheTestCase extends \PHPUnit_Framework_TestCase $this->catch = $catch; } - static public function clearDirectory($directory) + public static function clearDirectory($directory) { if (!is_dir($directory)) { return; diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php index bdbc4e80ff..88ff28b051 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php @@ -225,7 +225,7 @@ class Controller return new Response('foo'); } - static public function staticController() + public static function staticController() { return new Response('foo'); } diff --git a/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php b/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php index b7e25137a5..ad225129d3 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php @@ -62,7 +62,7 @@ class FileProfilerStorageTest extends AbstractProfilerStorageTest public function testMultiRowIndexFile() { $iteration = 3; - for($i = 0; $i < $iteration; $i++) { + for ($i = 0; $i < $iteration; $i++) { $profile = new Profile('token' . $i); $profile->setIp('127.0.0.' . $i); $profile->setUrl('http://foo.bar/' . $i); @@ -74,7 +74,7 @@ class FileProfilerStorageTest extends AbstractProfilerStorageTest } $handle = fopen(self::$tmpDir . '/index.csv', 'r'); - for($i = 0; $i < $iteration; $i++) { + for ($i = 0; $i < $iteration; $i++) { $row = fgetcsv($handle); $this->assertEquals('token' . $i, $row[0]); $this->assertEquals('127.0.0.' . $i, $row[1]); diff --git a/src/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php b/src/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php index 4679a0efa5..bff52e7c5e 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php @@ -26,7 +26,7 @@ class MongoDbProfilerStorageTest extends AbstractProfilerStorageTest { protected static $storage; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { if (extension_loaded('mongo')) { self::$storage = new DummyMongoDbProfilerStorage('mongodb://localhost/symfony_tests/profiler_data', '', '', 86400); @@ -38,7 +38,7 @@ class MongoDbProfilerStorageTest extends AbstractProfilerStorageTest } } - static public function tearDownAfterClass() + public static function tearDownAfterClass() { if (self::$storage) { self::$storage->purge(); diff --git a/src/Symfony/Component/Locale/Locale.php b/src/Symfony/Component/Locale/Locale.php index 0340213e6f..74f04ec161 100644 --- a/src/Symfony/Component/Locale/Locale.php +++ b/src/Symfony/Component/Locale/Locale.php @@ -40,7 +40,7 @@ class Locale extends \Locale * * @throws RuntimeException When the resource bundles cannot be loaded */ - static public function getDisplayCountries($locale) + public static function getDisplayCountries($locale) { if (!isset(self::$countries[$locale])) { $bundle = \ResourceBundle::create($locale, __DIR__.'/Resources/data/region'); @@ -81,7 +81,7 @@ class Locale extends \Locale * @return array The country codes * @throws RuntimeException When the resource bundles cannot be loaded */ - static public function getCountries() + public static function getCountries() { return array_keys(self::getDisplayCountries(self::getDefault())); } @@ -95,7 +95,7 @@ class Locale extends \Locale * * @throws RuntimeException When the resource bundles cannot be loaded */ - static public function getDisplayLanguages($locale) + public static function getDisplayLanguages($locale) { if (!isset(self::$languages[$locale])) { $bundle = \ResourceBundle::create($locale, __DIR__.'/Resources/data/lang'); @@ -134,7 +134,7 @@ class Locale extends \Locale * @return array The language codes * @throws RuntimeException When the resource bundles cannot be loaded */ - static public function getLanguages() + public static function getLanguages() { return array_keys(self::getDisplayLanguages(self::getDefault())); } @@ -146,7 +146,7 @@ class Locale extends \Locale * @return array The locale names with their codes as keys * @throws RuntimeException When the resource bundles cannot be loaded */ - static public function getDisplayLocales($locale) + public static function getDisplayLocales($locale) { if (!isset(self::$locales[$locale])) { $bundle = \ResourceBundle::create($locale, __DIR__.'/Resources/data/names'); @@ -182,7 +182,7 @@ class Locale extends \Locale * @return array The locale codes * @throws RuntimeException When the resource bundles cannot be loaded */ - static public function getLocales() + public static function getLocales() { return array_keys(self::getDisplayLocales(self::getDefault())); } @@ -192,7 +192,7 @@ class Locale extends \Locale * * @return string|null The ICU version */ - static public function getIcuVersion() + public static function getIcuVersion() { if (defined('INTL_ICU_VERSION')) { return INTL_ICU_VERSION; @@ -217,7 +217,7 @@ class Locale extends \Locale * * @return string|null The ICU Data version */ - static public function getIcuDataVersion() + public static function getIcuDataVersion() { if (defined('INTL_ICU_DATA_VERSION')) { return INTL_ICU_DATA_VERSION; @@ -243,7 +243,7 @@ class Locale extends \Locale * @param $locale The locale to find the fallback for * @return string|null The fallback locale, or null if no parent exists */ - static protected function getFallbackLocale($locale) + protected static function getFallbackLocale($locale) { if ($locale === self::getDefault()) { return null; diff --git a/src/Symfony/Component/Locale/Resources/data/update-data.php b/src/Symfony/Component/Locale/Resources/data/update-data.php index 69f511aec0..f65eb99529 100644 --- a/src/Symfony/Component/Locale/Resources/data/update-data.php +++ b/src/Symfony/Component/Locale/Resources/data/update-data.php @@ -398,7 +398,6 @@ genrb($namesGeneratedDir, $namesDir); clear_directory($namesGeneratedDir); rmdir($namesGeneratedDir); - // Generate the data to the stubbed intl classes We only extract data for the 'en' locale // The extracted data is used only by the stub classes $defaultLocale = 'en'; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php index 35386644a5..458fa8c750 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Locale\Stub\DateFormat; - /** * Parser and formatter for month format * @@ -22,7 +21,7 @@ class MonthTransformer extends Transformer /** * @var array */ - static protected $months = array( + protected static $months = array( 'January', 'February', 'March', @@ -41,19 +40,19 @@ class MonthTransformer extends Transformer * Short months names (first 3 letters) * @var array */ - static protected $shortMonths = array(); + protected static $shortMonths = array(); /** * Flipped $months array, $name => $index * @var array */ - static protected $flippedMonths = array(); + protected static $flippedMonths = array(); /** * Flipped $shortMonths array, $name => $index * @var array */ - static protected $flippedShortMonths = array(); + protected static $flippedShortMonths = array(); /** * Constructor diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php index ce37e349e8..e9cf0ebef9 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php @@ -74,7 +74,7 @@ class TimeZoneTransformer extends Transformer * @throws NotImplementedException When the GMT time zone have minutes offset different than zero * @throws InvalidArgumentException When the value can not be matched with pattern */ - static public function getEtcTimeZoneId($formattedTimeZone) + public static function getEtcTimeZoneId($formattedTimeZone) { if (preg_match('/GMT(?P[+-])(?P\d{2}):?(?P\d{2})/', $formattedTimeZone, $matches)) { $hours = (int) $matches['hours']; diff --git a/src/Symfony/Component/Locale/Stub/StubCollator.php b/src/Symfony/Component/Locale/Stub/StubCollator.php index 13f187d928..7f46288db3 100644 --- a/src/Symfony/Component/Locale/Stub/StubCollator.php +++ b/src/Symfony/Component/Locale/Stub/StubCollator.php @@ -76,7 +76,7 @@ class StubCollator * * @throws MethodArgumentValueNotImplementedException When $locale different than 'en' is passed */ - static public function create($locale) + public static function create($locale) { return new self($locale); } diff --git a/src/Symfony/Component/Locale/Stub/StubIntl.php b/src/Symfony/Component/Locale/Stub/StubIntl.php index a550954993..b89e52f702 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntl.php +++ b/src/Symfony/Component/Locale/Stub/StubIntl.php @@ -71,7 +71,7 @@ abstract class StubIntl * * @return Boolean */ - static public function isFailure($errorCode) + public static function isFailure($errorCode) { return isset(self::$errorCodes[$errorCode]) && $errorCode > self::U_ZERO_ERROR; @@ -84,7 +84,7 @@ abstract class StubIntl * * @return integer */ - static public function getErrorCode() + public static function getErrorCode() { return self::$errorCode; } @@ -96,7 +96,7 @@ abstract class StubIntl * * @return string */ - static public function getErrorMessage() + public static function getErrorMessage() { return self::$errorMessage; } @@ -106,7 +106,7 @@ abstract class StubIntl * * @return string */ - static public function getErrorName($code) + public static function getErrorName($code) { if (isset(self::$errorCodes[$code])) { return self::$errorCodes[$code]; @@ -123,7 +123,7 @@ abstract class StubIntl * * @throws \InvalidArgumentException If the code is not one of the error constants in this class */ - static public function setError($code, $message = '') + public static function setError($code, $message = '') { if (!isset(self::$errorCodes[$code])) { throw new \InvalidArgumentException(sprintf('No such error code: "%s"', $code)); diff --git a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php index d16bd667ff..2dc79d9d5f 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php @@ -155,7 +155,7 @@ class StubIntlDateFormatter * * @throws MethodArgumentValueNotImplementedException When $locale different than 'en' is passed */ - static public function create($locale, $datetype, $timetype, $timezone = null, $calendar = self::GREGORIAN, $pattern = null) + public static function create($locale, $datetype, $timetype, $timezone = null, $calendar = self::GREGORIAN, $pattern = null) { return new self($locale, $datetype, $timetype, $timezone, $calendar, $pattern); } diff --git a/src/Symfony/Component/Locale/Stub/StubLocale.php b/src/Symfony/Component/Locale/Stub/StubLocale.php index 5563d1304e..bf8d293dee 100644 --- a/src/Symfony/Component/Locale/Stub/StubLocale.php +++ b/src/Symfony/Component/Locale/Stub/StubLocale.php @@ -80,7 +80,7 @@ class StubLocale * * @throws InvalidArgumentException When the locale is different than 'en' */ - static public function getDisplayCountries($locale) + public static function getDisplayCountries($locale) { return self::getStubData($locale, 'countries', 'region'); } @@ -90,7 +90,7 @@ class StubLocale * * @return array The country codes */ - static public function getCountries() + public static function getCountries() { return array_keys(self::getDisplayCountries(self::getDefault())); } @@ -104,7 +104,7 @@ class StubLocale * * @throws InvalidArgumentException When the locale is different than 'en' */ - static public function getDisplayLanguages($locale) + public static function getDisplayLanguages($locale) { return self::getStubData($locale, 'languages', 'lang'); } @@ -114,7 +114,7 @@ class StubLocale * * @return array The language codes */ - static public function getLanguages() + public static function getLanguages() { return array_keys(self::getDisplayLanguages(self::getDefault())); } @@ -128,7 +128,7 @@ class StubLocale * * @throws InvalidArgumentException When the locale is different than 'en' */ - static public function getDisplayLocales($locale) + public static function getDisplayLocales($locale) { return self::getStubData($locale, 'locales', 'names'); } @@ -138,7 +138,7 @@ class StubLocale * * @return array The locale codes */ - static public function getLocales() + public static function getLocales() { return array_keys(self::getDisplayLocales(self::getDefault())); } @@ -150,7 +150,7 @@ class StubLocale * * @return array The currencies data */ - static public function getCurrenciesData($locale) + public static function getCurrenciesData($locale) { return self::getStubData($locale, 'currencies', 'curr'); } @@ -164,7 +164,7 @@ class StubLocale * * @throws InvalidArgumentException When the locale is different than 'en' */ - static public function getDisplayCurrencies($locale) + public static function getDisplayCurrencies($locale) { $currencies = self::getCurrenciesData($locale); @@ -184,7 +184,7 @@ class StubLocale * * @return array The currencies codes */ - static public function getCurrencies() + public static function getCurrencies() { return array_keys(self::getCurrenciesData(self::getDefault())); } @@ -200,7 +200,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function acceptFromHttp($header) + public static function acceptFromHttp($header) { throw new MethodNotImplementedException(__METHOD__); } @@ -216,7 +216,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function composeLocale(array $subtags) + public static function composeLocale(array $subtags) { throw new MethodNotImplementedException(__METHOD__); } @@ -234,7 +234,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function filterMatches($langtag, $locale, $canonicalize = false) + public static function filterMatches($langtag, $locale, $canonicalize = false) { throw new MethodNotImplementedException(__METHOD__); } @@ -250,7 +250,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function getAllVariants($locale) + public static function getAllVariants($locale) { throw new MethodNotImplementedException(__METHOD__); } @@ -264,7 +264,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function getDefault() + public static function getDefault() { return 'en'; } @@ -281,7 +281,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function getDisplayLanguage($locale, $inLocale = null) + public static function getDisplayLanguage($locale, $inLocale = null) { throw new MethodNotImplementedException(__METHOD__); } @@ -298,7 +298,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function getDisplayName($locale, $inLocale = null) + public static function getDisplayName($locale, $inLocale = null) { throw new MethodNotImplementedException(__METHOD__); } @@ -315,7 +315,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function getDisplayRegion($locale, $inLocale = null) + public static function getDisplayRegion($locale, $inLocale = null) { throw new MethodNotImplementedException(__METHOD__); } @@ -332,7 +332,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function getDisplayScript($locale, $inLocale = null) + public static function getDisplayScript($locale, $inLocale = null) { throw new MethodNotImplementedException(__METHOD__); } @@ -349,7 +349,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function getDisplayVariant($locale, $inLocale = null) + public static function getDisplayVariant($locale, $inLocale = null) { throw new MethodNotImplementedException(__METHOD__); } @@ -365,7 +365,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function getKeywords($locale) + public static function getKeywords($locale) { throw new MethodNotImplementedException(__METHOD__); } @@ -381,7 +381,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function getPrimaryLanguage($locale) + public static function getPrimaryLanguage($locale) { throw new MethodNotImplementedException(__METHOD__); } @@ -397,7 +397,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function getRegion($locale) + public static function getRegion($locale) { throw new MethodNotImplementedException(__METHOD__); } @@ -413,7 +413,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function getScript($locale) + public static function getScript($locale) { throw new MethodNotImplementedException(__METHOD__); } @@ -430,7 +430,7 @@ class StubLocale * * @throws RuntimeException When the intl extension is not loaded */ - static public function lookup(array $langtag, $locale, $canonicalize = false, $default = null) + public static function lookup(array $langtag, $locale, $canonicalize = false, $default = null) { throw new MethodNotImplementedException(__METHOD__); } @@ -446,7 +446,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function parseLocale($locale) + public static function parseLocale($locale) { throw new MethodNotImplementedException(__METHOD__); } @@ -462,7 +462,7 @@ class StubLocale * * @throws MethodNotImplementedException */ - static public function setDefault($locale) + public static function setDefault($locale) { throw new MethodNotImplementedException(__METHOD__); } @@ -478,7 +478,7 @@ class StubLocale * * @throws InvalidArgumentException When the locale is different than 'en' */ - static private function getStubData($locale, $cacheVariable, $stubDataDir) + private static function getStubData($locale, $cacheVariable, $stubDataDir) { if ('en' !== $locale) { throw new \InvalidArgumentException(sprintf('Only the \'en\' locale is supported. %s', NotImplementedException::INTL_INSTALL_MESSAGE)); diff --git a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php index 2524892a05..4cf860577c 100644 --- a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php @@ -158,7 +158,7 @@ class StubNumberFormatter * * @var array */ - static private $supportedStyles = array( + private static $supportedStyles = array( 'CURRENCY' => self::CURRENCY, 'DECIMAL' => self::DECIMAL ); @@ -168,7 +168,7 @@ class StubNumberFormatter * * @var array */ - static private $supportedAttributes = array( + private static $supportedAttributes = array( 'FRACTION_DIGITS' => self::FRACTION_DIGITS, 'GROUPING_USED' => self::GROUPING_USED, 'ROUNDING_MODE' => self::ROUNDING_MODE @@ -181,7 +181,7 @@ class StubNumberFormatter * * @var array */ - static private $roundingModes = array( + private static $roundingModes = array( 'ROUND_HALFEVEN' => self::ROUND_HALFEVEN, 'ROUND_HALFDOWN' => self::ROUND_HALFDOWN, 'ROUND_HALFUP' => self::ROUND_HALFUP @@ -195,7 +195,7 @@ class StubNumberFormatter * * @var array */ - static private $phpRoundingMap = array( + 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 @@ -206,7 +206,7 @@ class StubNumberFormatter * * @var array */ - static private $int32Range = array( + private static $int32Range = array( 'positive' => 2147483647, 'negative' => -2147483648 ); @@ -216,7 +216,7 @@ class StubNumberFormatter * * @var array */ - static private $int64Range = array( + private static $int64Range = array( 'positive' => 9223372036854775807, 'negative' => -9223372036854775808 ); @@ -274,7 +274,7 @@ class StubNumberFormatter * @throws MethodArgumentValueNotImplementedException When the $style is not supported * @throws MethodArgumentNotImplementedException When the pattern value is different than null */ - static public function create($locale = 'en', $style = null, $pattern = null) + public static function create($locale = 'en', $style = null, $pattern = null) { return new self($locale, $style, $pattern); } diff --git a/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php b/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php index db22e47fb7..af3967f149 100644 --- a/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php +++ b/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php @@ -246,7 +246,6 @@ class StubNumberFormatterTest extends LocaleTestCase $this->assertEquals(sprintf($expected, $symbol), $formatter->formatCurrency($value, $currency)); } - public function formatCurrencyWithCurrencyStyleSwissRoundingProvider() { // The currency symbol was updated from 4.2 to the 4.4 version. The ICU CLDR data was updated in 2010-03-03, diff --git a/src/Symfony/Component/OptionsResolver/Options.php b/src/Symfony/Component/OptionsResolver/Options.php index 51540b0b2f..88fa375f72 100644 --- a/src/Symfony/Component/OptionsResolver/Options.php +++ b/src/Symfony/Component/OptionsResolver/Options.php @@ -414,7 +414,7 @@ class Options implements \ArrayAccess, \Iterator, \Countable * * @return Boolean Whether it is a lazy option closure. */ - static private function isEvaluatedLazily($value) + private static function isEvaluatedLazily($value) { if (!$value instanceof \Closure) { return false; diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php b/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php index a8344ed0b2..27f4f84450 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php @@ -39,7 +39,7 @@ interface OptionsResolverInterface * * @return OptionsResolverInterface The resolver instance. */ - function setDefaults(array $defaultValues); + public function setDefaults(array $defaultValues); /** * Replaces default option values. @@ -54,7 +54,7 @@ interface OptionsResolverInterface * * @return OptionsResolverInterface The resolver instance. */ - function replaceDefaults(array $defaultValues); + public function replaceDefaults(array $defaultValues); /** * Sets optional options. @@ -71,7 +71,7 @@ interface OptionsResolverInterface * * @throws Exception\OptionDefinitionException When trying to pass default values. */ - function setOptional(array $optionNames); + public function setOptional(array $optionNames); /** * Sets required options. @@ -85,7 +85,7 @@ interface OptionsResolverInterface * * @throws Exception\OptionDefinitionException When trying to pass default values. */ - function setRequired(array $optionNames); + public function setRequired(array $optionNames); /** * Sets allowed values for a list of options. @@ -100,7 +100,7 @@ interface OptionsResolverInterface * (see {@link isKnown()}) for which * an allowed value is set. */ - function setAllowedValues(array $allowedValues); + public function setAllowedValues(array $allowedValues); /** * Adds allowed values for a list of options. @@ -117,7 +117,7 @@ interface OptionsResolverInterface * (see {@link isKnown()}) for which * an allowed value is set. */ - function addAllowedValues(array $allowedValues); + public function addAllowedValues(array $allowedValues); /** * Sets allowed types for a list of options. @@ -130,7 +130,7 @@ interface OptionsResolverInterface * @throws Exception\InvalidOptionsException If an option has not been defined for * which an allowed type is set. */ - function setAllowedTypes(array $allowedTypes); + public function setAllowedTypes(array $allowedTypes); /** * Adds allowed types for a list of options. @@ -145,7 +145,7 @@ interface OptionsResolverInterface * @throws Exception\InvalidOptionsException If an option has not been defined for * which an allowed type is set. */ - function addAllowedTypes(array $allowedTypes); + public function addAllowedTypes(array $allowedTypes); /** * Sets filters that are applied on resolved options. @@ -165,7 +165,7 @@ interface OptionsResolverInterface * * @return OptionsResolverInterface The resolver instance. */ - function setFilters(array $filters); + public function setFilters(array $filters); /** * Returns whether an option is known. @@ -177,7 +177,7 @@ interface OptionsResolverInterface * * @return Boolean Whether the option is known. */ - function isKnown($option); + public function isKnown($option); /** * Returns whether an option is required. @@ -190,7 +190,7 @@ interface OptionsResolverInterface * * @return Boolean Whether the option is required. */ - function isRequired($option); + public function isRequired($option); /** * Returns the combination of the default and the passed options. @@ -206,5 +206,5 @@ interface OptionsResolverInterface * @throws Exception\OptionDefinitionException If a cyclic dependency is detected * between two lazy options. */ - function resolve(array $options); + public function resolve(array $options); } diff --git a/src/Symfony/Component/OptionsResolver/Tests/OptionsTest.php b/src/Symfony/Component/OptionsResolver/Tests/OptionsTest.php index 70d4a194a2..ca0872feb8 100644 --- a/src/Symfony/Component/OptionsResolver/Tests/OptionsTest.php +++ b/src/Symfony/Component/OptionsResolver/Tests/OptionsTest.php @@ -38,7 +38,6 @@ class OptionsTest extends \PHPUnit_Framework_TestCase unset($this->options['bar']); - $this->assertTrue(isset($this->options['foo'])); $this->assertFalse(isset($this->options['bar'])); $this->assertEquals(0, $this->options['foo']); diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index bea18550ae..1c11505f07 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -57,7 +57,7 @@ class Process * * @var array */ - static public $exitCodes = array( + public static $exitCodes = array( 0 => 'OK', 1 => 'General error', 2 => 'Misuse of shell builtins', diff --git a/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php b/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php index 0f2f684032..deb0c0a2dd 100644 --- a/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php +++ b/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php @@ -30,12 +30,12 @@ interface GeneratorDumperInterface * * @return string Executable code */ - function dump(array $options = array()); + public function dump(array $options = array()); /** * Gets the routes to dump. * * @return RouteCollection A RouteCollection instance */ - function getRoutes(); + public function getRoutes(); } diff --git a/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php b/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php index 220334f57e..e28c79d2d6 100644 --- a/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php +++ b/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php @@ -39,5 +39,5 @@ interface UrlGeneratorInterface extends RequestContextAwareInterface * * @api */ - function generate($name, $parameters = array(), $absolute = false); + public function generate($name, $parameters = array(), $absolute = false); } diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php index 6e0561dd58..21f39eef65 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Routing\Matcher\Dumper; - /** * Dumps a set of Apache mod_rewrite rules. * @@ -140,7 +139,7 @@ class ApacheMatcherDumper extends MatcherDumper * * @return string The escaped string */ - static private function escape($string, $char, $with) + private static function escape($string, $char, $with) { $escaped = false; $output = ''; diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php b/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php index 08d03f5933..f85e4ceff0 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php @@ -26,12 +26,12 @@ interface MatcherDumperInterface * * @return string Executable code */ - function dump(array $options = array()); + public function dump(array $options = array()); /** * Gets the routes to dump. * * @return RouteCollection A RouteCollection instance */ - function getRoutes(); + public function getRoutes(); } diff --git a/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php b/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php index 7225c81cd5..929ae9cc78 100644 --- a/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php +++ b/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php @@ -31,5 +31,5 @@ interface RedirectableUrlMatcherInterface * * @api */ - function redirect($path, $route, $scheme = null); + public function redirect($path, $route, $scheme = null); } diff --git a/src/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php b/src/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php index d636cd093c..b5def3d468 100644 --- a/src/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php +++ b/src/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php @@ -35,5 +35,5 @@ interface RequestMatcherInterface * @throws ResourceNotFoundException If no matching resource could be found * @throws MethodNotAllowedException If a matching resource was found but the request method is not allowed */ - function matchRequest(Request $request); + public function matchRequest(Request $request); } diff --git a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php index ce372e8408..b517907bc1 100644 --- a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php @@ -166,10 +166,10 @@ class UrlMatcher implements UrlMatcherInterface /** * Get merged default parameters. - * + * * @param array $params The parameters * @param array $defaults The defaults - * + * * @return array Merged default parameters */ protected function mergeDefaults($params, $defaults) diff --git a/src/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php b/src/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php index 1242c2e962..dd718b1569 100644 --- a/src/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php +++ b/src/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php @@ -39,5 +39,5 @@ interface UrlMatcherInterface extends RequestContextAwareInterface * * @api */ - function match($pathinfo); + public function match($pathinfo); } diff --git a/src/Symfony/Component/Routing/RequestContextAwareInterface.php b/src/Symfony/Component/Routing/RequestContextAwareInterface.php index 8357b52f93..daf52549dd 100644 --- a/src/Symfony/Component/Routing/RequestContextAwareInterface.php +++ b/src/Symfony/Component/Routing/RequestContextAwareInterface.php @@ -23,7 +23,7 @@ interface RequestContextAwareInterface * * @api */ - function setContext(RequestContext $context); + public function setContext(RequestContext $context); /** * Gets the request context. @@ -32,5 +32,5 @@ interface RequestContextAwareInterface * * @api */ - function getContext(); + public function getContext(); } diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index f18b0ed757..dacdb262d8 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -26,7 +26,7 @@ class Route private $options; private $compiled; - static private $compilers = array(); + private static $compilers = array(); /** * Constructor. diff --git a/src/Symfony/Component/Routing/RouteCompilerInterface.php b/src/Symfony/Component/Routing/RouteCompilerInterface.php index 5193665629..f72e9e5ef4 100644 --- a/src/Symfony/Component/Routing/RouteCompilerInterface.php +++ b/src/Symfony/Component/Routing/RouteCompilerInterface.php @@ -25,5 +25,5 @@ interface RouteCompilerInterface * * @return CompiledRoute A CompiledRoute instance */ - function compile(Route $route); + public function compile(Route $route); } diff --git a/src/Symfony/Component/Routing/RouterInterface.php b/src/Symfony/Component/Routing/RouterInterface.php index 529a85f2e9..a10ae34e07 100644 --- a/src/Symfony/Component/Routing/RouterInterface.php +++ b/src/Symfony/Component/Routing/RouterInterface.php @@ -28,5 +28,5 @@ interface RouterInterface extends UrlMatcherInterface, UrlGeneratorInterface * * @return RouteCollection A RouteCollection instance */ - function getRouteCollection(); + public function getRouteCollection(); } diff --git a/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php b/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php index dc080db6ff..ff3c20c26d 100644 --- a/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php +++ b/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php @@ -43,4 +43,3 @@ class RouteTest extends \PHPUnit_Framework_TestCase ); } } - diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml b/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml index e645d9b6ec..d5136cbab8 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml +++ b/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml @@ -3,4 +3,3 @@ blog_show: defaults: { _controller: MyBlogBundle:Blog:show } options: compiler_class: RouteCompiler - diff --git a/src/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php index a30555b8c6..c927ae4a85 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Routing\Tests\Loader; - abstract class AbstractAnnotationLoaderTest extends \PHPUnit_Framework_TestCase { protected function setUp() diff --git a/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php index f4b30e3262..74c38737f2 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php @@ -50,4 +50,3 @@ class PhpFileLoaderTest extends \PHPUnit_Framework_TestCase $this->assertEquals('RouteCompiler', $route->getOption('compiler_class')); } } - diff --git a/src/Symfony/Component/Routing/Tests/Matcher/ApacheUrlMatcherTest.php b/src/Symfony/Component/Routing/Tests/Matcher/ApacheUrlMatcherTest.php index e68b61804c..29ef25f48a 100644 --- a/src/Symfony/Component/Routing/Tests/Matcher/ApacheUrlMatcherTest.php +++ b/src/Symfony/Component/Routing/Tests/Matcher/ApacheUrlMatcherTest.php @@ -66,4 +66,3 @@ class ApacheUrlMatcherTest extends \PHPUnit_Framework_TestCase ); } } - diff --git a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/ApacheMatcherDumperTest.php b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/ApacheMatcherDumperTest.php index 65cb454bee..7b5bde5604 100644 --- a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/ApacheMatcherDumperTest.php +++ b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/ApacheMatcherDumperTest.php @@ -17,9 +17,9 @@ use Symfony\Component\Routing\Matcher\Dumper\ApacheMatcherDumper; class ApacheMatcherDumperTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../../Fixtures/'); } diff --git a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php index 3677c7e324..69b3c07fd7 100644 --- a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php +++ b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php @@ -14,7 +14,6 @@ namespace Symfony\Component\Routing\Tests\Matcher\Dumper; use Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RequestContext; class PhpMatcherDumperTest extends \PHPUnit_Framework_TestCase { diff --git a/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php index 84138430a2..ada4f22f79 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php +++ b/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php @@ -339,7 +339,7 @@ QUERY; * @param ObjectIdentityInterface $oid * @return integer */ - protected final function retrieveObjectIdentityPrimaryKey(ObjectIdentityInterface $oid) + final protected function retrieveObjectIdentityPrimaryKey(ObjectIdentityInterface $oid) { return $this->connection->executeQuery($this->getSelectObjectIdentityIdSql($oid))->fetchColumn(); } diff --git a/src/Symfony/Component/Security/Acl/Domain/Acl.php b/src/Symfony/Component/Security/Acl/Domain/Acl.php index 6d5313177c..4665c0e18d 100644 --- a/src/Symfony/Component/Security/Acl/Domain/Acl.php +++ b/src/Symfony/Component/Security/Acl/Domain/Acl.php @@ -19,7 +19,6 @@ use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface; use Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; - /** * An ACL implementation. * diff --git a/src/Symfony/Component/Security/Acl/Domain/ObjectIdentity.php b/src/Symfony/Component/Security/Acl/Domain/ObjectIdentity.php index e37e82b0e1..da98f5ea63 100644 --- a/src/Symfony/Component/Security/Acl/Domain/ObjectIdentity.php +++ b/src/Symfony/Component/Security/Acl/Domain/ObjectIdentity.php @@ -52,7 +52,7 @@ final class ObjectIdentity implements ObjectIdentityInterface * @throws \InvalidArgumentException * @return ObjectIdentity */ - static public function fromDomainObject($domainObject) + public static function fromDomainObject($domainObject) { if (!is_object($domainObject)) { throw new InvalidDomainObjectException('$domainObject must be an object.'); diff --git a/src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php b/src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php index 040e43b749..ebb0056160 100644 --- a/src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php +++ b/src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php @@ -51,7 +51,7 @@ final class UserSecurityIdentity implements SecurityIdentityInterface * @param UserInterface $user * @return UserSecurityIdentity */ - static public function fromAccount(UserInterface $user) + public static function fromAccount(UserInterface $user) { return new self($user->getUsername(), ClassUtils::getRealClass($user)); } @@ -62,7 +62,7 @@ final class UserSecurityIdentity implements SecurityIdentityInterface * @param TokenInterface $token * @return UserSecurityIdentity */ - static public function fromToken(TokenInterface $token) + public static function fromToken(TokenInterface $token) { $user = $token->getUser(); diff --git a/src/Symfony/Component/Security/Acl/Model/AclCacheInterface.php b/src/Symfony/Component/Security/Acl/Model/AclCacheInterface.php index dd515cec94..ea9604e43b 100644 --- a/src/Symfony/Component/Security/Acl/Model/AclCacheInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/AclCacheInterface.php @@ -23,7 +23,7 @@ interface AclCacheInterface * * @param string $primaryKey a serialized primary key */ - function evictFromCacheById($primaryKey); + public function evictFromCacheById($primaryKey); /** * Removes an ACL from the cache @@ -32,7 +32,7 @@ interface AclCacheInterface * * @param ObjectIdentityInterface $oid */ - function evictFromCacheByIdentity(ObjectIdentityInterface $oid); + public function evictFromCacheByIdentity(ObjectIdentityInterface $oid); /** * Retrieves an ACL for the given object identity primary key from the cache @@ -40,7 +40,7 @@ interface AclCacheInterface * @param integer $primaryKey * @return AclInterface */ - function getFromCacheById($primaryKey); + public function getFromCacheById($primaryKey); /** * Retrieves an ACL for the given object identity from the cache @@ -48,17 +48,17 @@ interface AclCacheInterface * @param ObjectIdentityInterface $oid * @return AclInterface */ - function getFromCacheByIdentity(ObjectIdentityInterface $oid); + public function getFromCacheByIdentity(ObjectIdentityInterface $oid); /** * Stores a new ACL in the cache * * @param AclInterface $acl */ - function putInCache(AclInterface $acl); + public function putInCache(AclInterface $acl); /** * Removes all ACLs from the cache */ - function clearCache(); + public function clearCache(); } diff --git a/src/Symfony/Component/Security/Acl/Model/AclInterface.php b/src/Symfony/Component/Security/Acl/Model/AclInterface.php index 90945607a7..fffe59166f 100644 --- a/src/Symfony/Component/Security/Acl/Model/AclInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/AclInterface.php @@ -28,7 +28,7 @@ interface AclInterface extends \Serializable * * @return array */ - function getClassAces(); + public function getClassAces(); /** * Returns all class-field-based ACEs associated with this ACL @@ -36,14 +36,14 @@ interface AclInterface extends \Serializable * @param string $field * @return array */ - function getClassFieldAces($field); + public function getClassFieldAces($field); /** * Returns all object-based ACEs associated with this ACL * * @return array */ - function getObjectAces(); + public function getObjectAces(); /** * Returns all object-field-based ACEs associated with this ACL @@ -51,28 +51,28 @@ interface AclInterface extends \Serializable * @param string $field * @return array */ - function getObjectFieldAces($field); + public function getObjectFieldAces($field); /** * Returns the object identity associated with this ACL * * @return ObjectIdentityInterface */ - function getObjectIdentity(); + public function getObjectIdentity(); /** * Returns the parent ACL, or null if there is none. * * @return AclInterface|null */ - function getParentAcl(); + public function getParentAcl(); /** * Whether this ACL is inheriting ACEs from a parent ACL. * * @return Boolean */ - function isEntriesInheriting(); + public function isEntriesInheriting(); /** * Determines whether field access is granted @@ -83,7 +83,7 @@ interface AclInterface extends \Serializable * @param Boolean $administrativeMode * @return Boolean */ - function isFieldGranted($field, array $masks, array $securityIdentities, $administrativeMode = false); + public function isFieldGranted($field, array $masks, array $securityIdentities, $administrativeMode = false); /** * Determines whether access is granted @@ -94,7 +94,7 @@ interface AclInterface extends \Serializable * @param Boolean $administrativeMode * @return Boolean */ - function isGranted(array $masks, array $securityIdentities, $administrativeMode = false); + public function isGranted(array $masks, array $securityIdentities, $administrativeMode = false); /** * Whether the ACL has loaded ACEs for all of the passed security identities @@ -102,5 +102,5 @@ interface AclInterface extends \Serializable * @param mixed $securityIdentities an implementation of SecurityIdentityInterface, or an array thereof * @return Boolean */ - function isSidLoaded($securityIdentities); + public function isSidLoaded($securityIdentities); } diff --git a/src/Symfony/Component/Security/Acl/Model/AclProviderInterface.php b/src/Symfony/Component/Security/Acl/Model/AclProviderInterface.php index 2f878e1a92..bdb40b7797 100644 --- a/src/Symfony/Component/Security/Acl/Model/AclProviderInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/AclProviderInterface.php @@ -25,7 +25,7 @@ interface AclProviderInterface * @param Boolean $directChildrenOnly * @return array returns an array of child 'ObjectIdentity's */ - function findChildren(ObjectIdentityInterface $parentOid, $directChildrenOnly = false); + public function findChildren(ObjectIdentityInterface $parentOid, $directChildrenOnly = false); /** * Returns the ACL that belongs to the given object identity @@ -35,7 +35,7 @@ interface AclProviderInterface * @param array $sids * @return AclInterface */ - function findAcl(ObjectIdentityInterface $oid, array $sids = array()); + public function findAcl(ObjectIdentityInterface $oid, array $sids = array()); /** * Returns the ACLs that belong to the given object identities @@ -45,5 +45,5 @@ interface AclProviderInterface * @param array $sids an array of SecurityIdentityInterface implementations * @return \SplObjectStorage mapping the passed object identities to ACLs */ - function findAcls(array $oids, array $sids = array()); + public function findAcls(array $oids, array $sids = array()); } diff --git a/src/Symfony/Component/Security/Acl/Model/AuditLoggerInterface.php b/src/Symfony/Component/Security/Acl/Model/AuditLoggerInterface.php index 7cab6f19ea..09bcbb8664 100644 --- a/src/Symfony/Component/Security/Acl/Model/AuditLoggerInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/AuditLoggerInterface.php @@ -25,5 +25,5 @@ interface AuditLoggerInterface * @param Boolean $granted * @param EntryInterface $ace */ - function logIfNeeded($granted, EntryInterface $ace); + public function logIfNeeded($granted, EntryInterface $ace); } diff --git a/src/Symfony/Component/Security/Acl/Model/AuditableAclInterface.php b/src/Symfony/Component/Security/Acl/Model/AuditableAclInterface.php index 5da593e85a..14b4c04727 100644 --- a/src/Symfony/Component/Security/Acl/Model/AuditableAclInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/AuditableAclInterface.php @@ -25,7 +25,7 @@ interface AuditableAclInterface extends MutableAclInterface * @param Boolean $auditSuccess * @param Boolean $auditFailure */ - function updateClassAuditing($index, $auditSuccess, $auditFailure); + public function updateClassAuditing($index, $auditSuccess, $auditFailure); /** * Updates auditing for class-field-based ACE @@ -35,7 +35,7 @@ interface AuditableAclInterface extends MutableAclInterface * @param Boolean $auditSuccess * @param Boolean $auditFailure */ - function updateClassFieldAuditing($index, $field, $auditSuccess, $auditFailure); + public function updateClassFieldAuditing($index, $field, $auditSuccess, $auditFailure); /** * Updates auditing for object-based ACE @@ -44,7 +44,7 @@ interface AuditableAclInterface extends MutableAclInterface * @param Boolean $auditSuccess * @param Boolean $auditFailure */ - function updateObjectAuditing($index, $auditSuccess, $auditFailure); + public function updateObjectAuditing($index, $auditSuccess, $auditFailure); /** * Updates auditing for object-field-based ACE @@ -54,5 +54,5 @@ interface AuditableAclInterface extends MutableAclInterface * @param Boolean $auditSuccess * @param Boolean $auditFailure */ - function updateObjectFieldAuditing($index, $field, $auditSuccess, $auditFailure); + public function updateObjectFieldAuditing($index, $field, $auditSuccess, $auditFailure); } diff --git a/src/Symfony/Component/Security/Acl/Model/AuditableEntryInterface.php b/src/Symfony/Component/Security/Acl/Model/AuditableEntryInterface.php index 40c4484f9b..e957965c48 100644 --- a/src/Symfony/Component/Security/Acl/Model/AuditableEntryInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/AuditableEntryInterface.php @@ -23,12 +23,12 @@ interface AuditableEntryInterface extends EntryInterface * * @return Boolean */ - function isAuditFailure(); + public function isAuditFailure(); /** * Whether auditing for successful denies is turned on * * @return Boolean */ - function isAuditSuccess(); + public function isAuditSuccess(); } diff --git a/src/Symfony/Component/Security/Acl/Model/DomainObjectInterface.php b/src/Symfony/Component/Security/Acl/Model/DomainObjectInterface.php index 50bc4c34d6..195cb4ec64 100644 --- a/src/Symfony/Component/Security/Acl/Model/DomainObjectInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/DomainObjectInterface.php @@ -25,5 +25,5 @@ interface DomainObjectInterface * * @return string */ - function getObjectIdentifier(); + public function getObjectIdentifier(); } diff --git a/src/Symfony/Component/Security/Acl/Model/EntryInterface.php b/src/Symfony/Component/Security/Acl/Model/EntryInterface.php index 6fe0dc8a11..98b754c111 100644 --- a/src/Symfony/Component/Security/Acl/Model/EntryInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/EntryInterface.php @@ -26,40 +26,40 @@ interface EntryInterface extends \Serializable * * @return AclInterface */ - function getAcl(); + public function getAcl(); /** * The primary key of this ACE * * @return integer */ - function getId(); + public function getId(); /** * The permission mask of this ACE * * @return integer */ - function getMask(); + public function getMask(); /** * The security identity associated with this ACE * * @return SecurityIdentityInterface */ - function getSecurityIdentity(); + public function getSecurityIdentity(); /** * The strategy for comparing masks * * @return string */ - function getStrategy(); + public function getStrategy(); /** * Returns whether this ACE is granting, or denying * * @return Boolean */ - function isGranting(); + public function isGranting(); } diff --git a/src/Symfony/Component/Security/Acl/Model/FieldEntryInterface.php b/src/Symfony/Component/Security/Acl/Model/FieldEntryInterface.php index a35ddb4cb5..8382ae1b53 100644 --- a/src/Symfony/Component/Security/Acl/Model/FieldEntryInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/FieldEntryInterface.php @@ -23,5 +23,5 @@ interface FieldEntryInterface extends EntryInterface * * @return string */ - function getField(); + public function getField(); } diff --git a/src/Symfony/Component/Security/Acl/Model/MutableAclInterface.php b/src/Symfony/Component/Security/Acl/Model/MutableAclInterface.php index f84e8176f0..9028aa9d8c 100644 --- a/src/Symfony/Component/Security/Acl/Model/MutableAclInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/MutableAclInterface.php @@ -26,7 +26,7 @@ interface MutableAclInterface extends AclInterface * * @param integer $index */ - function deleteClassAce($index); + public function deleteClassAce($index); /** * Deletes a class-field-based ACE @@ -34,14 +34,14 @@ interface MutableAclInterface extends AclInterface * @param integer $index * @param string $field */ - function deleteClassFieldAce($index, $field); + public function deleteClassFieldAce($index, $field); /** * Deletes an object-based ACE * * @param integer $index */ - function deleteObjectAce($index); + public function deleteObjectAce($index); /** * Deletes an object-field-based ACE @@ -49,14 +49,14 @@ interface MutableAclInterface extends AclInterface * @param integer $index * @param string $field */ - function deleteObjectFieldAce($index, $field); + public function deleteObjectFieldAce($index, $field); /** * Returns the primary key of this ACL * * @return integer */ - function getId(); + public function getId(); /** * Inserts a class-based ACE @@ -67,7 +67,7 @@ interface MutableAclInterface extends AclInterface * @param Boolean $granting * @param string $strategy */ - function insertClassAce(SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null); + public function insertClassAce(SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null); /** * Inserts a class-field-based ACE @@ -79,7 +79,7 @@ interface MutableAclInterface extends AclInterface * @param Boolean $granting * @param string $strategy */ - function insertClassFieldAce($field, SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null); + public function insertClassFieldAce($field, SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null); /** * Inserts an object-based ACE @@ -90,7 +90,7 @@ interface MutableAclInterface extends AclInterface * @param Boolean $granting * @param string $strategy */ - function insertObjectAce(SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null); + public function insertObjectAce(SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null); /** * Inserts an object-field-based ACE @@ -102,14 +102,14 @@ interface MutableAclInterface extends AclInterface * @param Boolean $granting * @param string $strategy */ - function insertObjectFieldAce($field, SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null); + public function insertObjectFieldAce($field, SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null); /** * Sets whether entries are inherited * * @param Boolean $boolean */ - function setEntriesInheriting($boolean); + public function setEntriesInheriting($boolean); /** * Sets the parent ACL @@ -117,7 +117,7 @@ interface MutableAclInterface extends AclInterface * @param AclInterface|null $acl * @return void */ - function setParentAcl(AclInterface $acl = null); + public function setParentAcl(AclInterface $acl = null); /** * Updates a class-based ACE @@ -126,7 +126,7 @@ interface MutableAclInterface extends AclInterface * @param integer $mask * @param string $strategy if null the strategy should not be changed */ - function updateClassAce($index, $mask, $strategy = null); + public function updateClassAce($index, $mask, $strategy = null); /** * Updates a class-field-based ACE @@ -136,7 +136,7 @@ interface MutableAclInterface extends AclInterface * @param integer $mask * @param string $strategy if null the strategy should not be changed */ - function updateClassFieldAce($index, $field, $mask, $strategy = null); + public function updateClassFieldAce($index, $field, $mask, $strategy = null); /** * Updates an object-based ACE @@ -145,7 +145,7 @@ interface MutableAclInterface extends AclInterface * @param integer $mask * @param string $strategy if null the strategy should not be changed */ - function updateObjectAce($index, $mask, $strategy = null); + public function updateObjectAce($index, $mask, $strategy = null); /** * Updates an object-field-based ACE @@ -155,5 +155,5 @@ interface MutableAclInterface extends AclInterface * @param integer $mask * @param string $strategy if null the strategy should not be changed */ - function updateObjectFieldAce($index, $field, $mask, $strategy = null); + public function updateObjectFieldAce($index, $field, $mask, $strategy = null); } diff --git a/src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php b/src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php index 04cf237d92..cb34b7206e 100644 --- a/src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php @@ -26,7 +26,7 @@ interface MutableAclProviderInterface extends AclProviderInterface * @param ObjectIdentityInterface $oid * @return MutableAclInterface */ - function createAcl(ObjectIdentityInterface $oid); + public function createAcl(ObjectIdentityInterface $oid); /** * Deletes the ACL for a given object identity. @@ -36,7 +36,7 @@ interface MutableAclProviderInterface extends AclProviderInterface * * @param ObjectIdentityInterface $oid */ - function deleteAcl(ObjectIdentityInterface $oid); + public function deleteAcl(ObjectIdentityInterface $oid); /** * Persists any changes which were made to the ACL, or any associated @@ -46,5 +46,5 @@ interface MutableAclProviderInterface extends AclProviderInterface * * @param MutableAclInterface $acl */ - function updateAcl(MutableAclInterface $acl); + public function updateAcl(MutableAclInterface $acl); } diff --git a/src/Symfony/Component/Security/Acl/Model/ObjectIdentityInterface.php b/src/Symfony/Component/Security/Acl/Model/ObjectIdentityInterface.php index 7e892bfd88..8ad0ebae61 100644 --- a/src/Symfony/Component/Security/Acl/Model/ObjectIdentityInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/ObjectIdentityInterface.php @@ -30,7 +30,7 @@ interface ObjectIdentityInterface * @param ObjectIdentityInterface $identity * @return Boolean */ - function equals(ObjectIdentityInterface $identity); + public function equals(ObjectIdentityInterface $identity); /** * Obtains a unique identifier for this object. The identifier must not be @@ -38,12 +38,12 @@ interface ObjectIdentityInterface * * @return string cannot return null */ - function getIdentifier(); + public function getIdentifier(); /** * Returns a type for the domain object. Typically, this is the PHP class name. * * @return string cannot return null */ - function getType(); + public function getType(); } diff --git a/src/Symfony/Component/Security/Acl/Model/ObjectIdentityRetrievalStrategyInterface.php b/src/Symfony/Component/Security/Acl/Model/ObjectIdentityRetrievalStrategyInterface.php index e53c3da1ea..b0f7f78528 100644 --- a/src/Symfony/Component/Security/Acl/Model/ObjectIdentityRetrievalStrategyInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/ObjectIdentityRetrievalStrategyInterface.php @@ -24,5 +24,5 @@ interface ObjectIdentityRetrievalStrategyInterface * @param object $domainObject * @return ObjectIdentityInterface */ - function getObjectIdentity($domainObject); + public function getObjectIdentity($domainObject); } diff --git a/src/Symfony/Component/Security/Acl/Model/PermissionGrantingStrategyInterface.php b/src/Symfony/Component/Security/Acl/Model/PermissionGrantingStrategyInterface.php index 7afdfac7ed..7f8f81bb28 100644 --- a/src/Symfony/Component/Security/Acl/Model/PermissionGrantingStrategyInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/PermissionGrantingStrategyInterface.php @@ -27,7 +27,7 @@ interface PermissionGrantingStrategyInterface * @param Boolean $administrativeMode * @return Boolean */ - function isGranted(AclInterface $acl, array $masks, array $sids, $administrativeMode = false); + public function isGranted(AclInterface $acl, array $masks, array $sids, $administrativeMode = false); /** * Determines whether access to a domain object's field is to be granted @@ -40,5 +40,5 @@ interface PermissionGrantingStrategyInterface * * @return Boolean */ - function isFieldGranted(AclInterface $acl, $field, array $masks, array $sids, $administrativeMode = false); + public function isFieldGranted(AclInterface $acl, $field, array $masks, array $sids, $administrativeMode = false); } diff --git a/src/Symfony/Component/Security/Acl/Model/SecurityIdentityInterface.php b/src/Symfony/Component/Security/Acl/Model/SecurityIdentityInterface.php index 5bf6189e4b..0a24a543d2 100644 --- a/src/Symfony/Component/Security/Acl/Model/SecurityIdentityInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/SecurityIdentityInterface.php @@ -26,5 +26,5 @@ interface SecurityIdentityInterface * * @param SecurityIdentityInterface $identity */ - function equals(SecurityIdentityInterface $identity); + public function equals(SecurityIdentityInterface $identity); } diff --git a/src/Symfony/Component/Security/Acl/Model/SecurityIdentityRetrievalStrategyInterface.php b/src/Symfony/Component/Security/Acl/Model/SecurityIdentityRetrievalStrategyInterface.php index 3bbbaa4a47..c20f04bfb7 100644 --- a/src/Symfony/Component/Security/Acl/Model/SecurityIdentityRetrievalStrategyInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/SecurityIdentityRetrievalStrategyInterface.php @@ -30,5 +30,5 @@ interface SecurityIdentityRetrievalStrategyInterface * @param TokenInterface $token * @return array of SecurityIdentityInterface implementations */ - function getSecurityIdentities(TokenInterface $token); + public function getSecurityIdentities(TokenInterface $token); } diff --git a/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php b/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php index 69215585cb..df1fa7c2a1 100644 --- a/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php +++ b/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php @@ -175,7 +175,7 @@ class MaskBuilder * @throws \RuntimeException * @return string */ - static public function getCode($mask) + public static function getCode($mask) { if (!is_int($mask)) { throw new \InvalidArgumentException('$mask must be an integer.'); diff --git a/src/Symfony/Component/Security/Acl/Permission/PermissionMapInterface.php b/src/Symfony/Component/Security/Acl/Permission/PermissionMapInterface.php index c2e49d5a58..44c15cc945 100644 --- a/src/Symfony/Component/Security/Acl/Permission/PermissionMapInterface.php +++ b/src/Symfony/Component/Security/Acl/Permission/PermissionMapInterface.php @@ -28,7 +28,7 @@ interface PermissionMapInterface * @param object $object * @return array may return null if permission/object combination is not supported */ - function getMasks($permission, $object); + public function getMasks($permission, $object); /** * Whether this map contains the given permission @@ -36,5 +36,5 @@ interface PermissionMapInterface * @param string $permission * @return Boolean */ - function contains($permission); + public function contains($permission); } diff --git a/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php b/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php index 25ded7a5f9..d65874bae6 100644 --- a/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php +++ b/src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php @@ -25,7 +25,6 @@ $loader->registerNamespaces(array( )); $loader->register(); - $schema = new Schema(array( 'class_table_name' => 'acl_classes', 'entry_table_name' => 'acl_entries', diff --git a/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php b/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php index 36cdc92e74..d8f4716002 100644 --- a/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php @@ -31,5 +31,5 @@ interface AuthenticationManagerInterface * * @throws AuthenticationException if the authentication fails */ - function authenticate(TokenInterface $token); + public function authenticate(TokenInterface $token); } diff --git a/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php b/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php index adcef3cd4e..ac07db0afa 100644 --- a/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php @@ -30,7 +30,7 @@ interface AuthenticationTrustResolverInterface * * @return Boolean */ - function isAnonymous(TokenInterface $token = null); + public function isAnonymous(TokenInterface $token = null); /** * Resolves whether the passed token implementation is authenticated @@ -40,7 +40,7 @@ interface AuthenticationTrustResolverInterface * * @return Boolean */ - function isRememberMe(TokenInterface $token = null); + public function isRememberMe(TokenInterface $token = null); /** * Resolves whether the passed token implementation is fully authenticated. @@ -49,5 +49,5 @@ interface AuthenticationTrustResolverInterface * * @return Boolean */ - function isFullFledged(TokenInterface $token = null); + public function isFullFledged(TokenInterface $token = null); } diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentTokenInterface.php b/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentTokenInterface.php index 38acbc3a57..6e9d891a56 100644 --- a/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentTokenInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentTokenInterface.php @@ -23,29 +23,29 @@ interface PersistentTokenInterface * Returns the class of the user * @return string */ - function getClass(); + public function getClass(); /** * Returns the username * @return string */ - function getUsername(); + public function getUsername(); /** * Returns the series * @return string */ - function getSeries(); + public function getSeries(); /** * Returns the token value * @return string */ - function getTokenValue(); + public function getTokenValue(); /** * Returns the last time the cookie was used * @return \DateTime */ - function getLastUsed(); + public function getLastUsed(); } diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php b/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php index db40a1cd16..c8cfbd1845 100644 --- a/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php @@ -27,14 +27,14 @@ interface TokenProviderInterface * * @return PersistentTokenInterface */ - function loadTokenBySeries($series); + public function loadTokenBySeries($series); /** * Deletes all tokens belonging to series. * * @param string $series */ - function deleteTokenBySeries($series); + public function deleteTokenBySeries($series); /** * Updates the token according to this data. @@ -43,12 +43,12 @@ interface TokenProviderInterface * @param string $tokenValue * @param DateTime $lastUsed */ - function updateToken($series, $tokenValue, \DateTime $lastUsed); + public function updateToken($series, $tokenValue, \DateTime $lastUsed); /** * Creates a new token. * * @param PersistentTokenInterface $token */ - function createNewToken(PersistentTokenInterface $token); + public function createNewToken(PersistentTokenInterface $token); } diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php b/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php index 3dafccc2de..dec31d5a63 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php @@ -26,21 +26,21 @@ interface TokenInterface extends \Serializable * * @return string */ - function __toString(); + public function __toString(); /** * Returns the user roles. * * @return Role[] An array of Role instances. */ - function getRoles(); + public function getRoles(); /** * Returns the user credentials. * * @return mixed The user credentials */ - function getCredentials(); + public function getCredentials(); /** * Returns a user representation. @@ -48,54 +48,54 @@ interface TokenInterface extends \Serializable * @return mixed either returns an object which implements __toString(), or * a primitive string is returned. */ - function getUser(); + public function getUser(); /** * Sets a user. * * @param mixed $user */ - function setUser($user); + public function setUser($user); /** * Returns the username. * * @return string */ - function getUsername(); + public function getUsername(); /** * Returns whether the user is authenticated or not. * * @return Boolean true if the token has been authenticated, false otherwise */ - function isAuthenticated(); + public function isAuthenticated(); /** * Sets the authenticated flag. * * @param Boolean $isAuthenticated The authenticated flag */ - function setAuthenticated($isAuthenticated); + public function setAuthenticated($isAuthenticated); /** * Removes sensitive information from the token. */ - function eraseCredentials(); + public function eraseCredentials(); /** * Returns the token attributes. * * @return array The token attributes */ - function getAttributes(); + public function getAttributes(); /** * Sets the token attributes. * * @param array $attributes The token attributes */ - function setAttributes(array $attributes); + public function setAttributes(array $attributes); /** * Returns true if the attribute exists. @@ -104,7 +104,7 @@ interface TokenInterface extends \Serializable * * @return Boolean true if the attribute exists, false otherwise */ - function hasAttribute($name); + public function hasAttribute($name); /** * Returns an attribute value. @@ -115,7 +115,7 @@ interface TokenInterface extends \Serializable * * @throws \InvalidArgumentException When attribute doesn't exist for this token */ - function getAttribute($name); + public function getAttribute($name); /** * Sets an attribute. @@ -123,5 +123,5 @@ interface TokenInterface extends \Serializable * @param string $name The attribute name * @param mixed $value The attribute value */ - function setAttribute($name, $value); + public function setAttribute($name, $value); } diff --git a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManagerInterface.php b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManagerInterface.php index 648047ab14..742ea74fb6 100644 --- a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManagerInterface.php +++ b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManagerInterface.php @@ -29,7 +29,7 @@ interface AccessDecisionManagerInterface * * @return Boolean true if the access is granted, false otherwise */ - function decide(TokenInterface $token, array $attributes, $object = null); + public function decide(TokenInterface $token, array $attributes, $object = null); /** * Checks if the access decision manager supports the given attribute. @@ -38,7 +38,7 @@ interface AccessDecisionManagerInterface * * @return Boolean true if this decision manager supports the attribute, false otherwise */ - function supportsAttribute($attribute); + public function supportsAttribute($attribute); /** * Checks if the access decision manager supports the given class. @@ -47,5 +47,5 @@ interface AccessDecisionManagerInterface * * @return true if this decision manager can process the class */ - function supportsClass($class); + public function supportsClass($class); } diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php b/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php index 41d9e6475a..1fc93e50cc 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php @@ -31,7 +31,7 @@ interface VoterInterface * * @return Boolean true if this Voter supports the attribute, false otherwise */ - function supportsAttribute($attribute); + public function supportsAttribute($attribute); /** * Checks if the voter supports the given class. @@ -40,7 +40,7 @@ interface VoterInterface * * @return true if this Voter can process the class */ - function supportsClass($class); + public function supportsClass($class); /** * Returns the vote for the given parameters. @@ -54,5 +54,5 @@ interface VoterInterface * * @return integer either ACCESS_GRANTED, ACCESS_ABSTAIN, or ACCESS_DENIED */ - function vote(TokenInterface $token, $object, array $attributes); + public function vote(TokenInterface $token, $object, array $attributes); } diff --git a/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php b/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php index 7d34cc72dd..9429441d6b 100644 --- a/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php +++ b/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Security\Core\Encoder; -use Symfony\Component\Security\Core\User\UserInterface; - /** * A generic encoder factory implementation * diff --git a/src/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php b/src/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php index 125e57b8f2..f6b4a25b08 100644 --- a/src/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php +++ b/src/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php @@ -29,5 +29,5 @@ interface EncoderFactoryInterface * * @throws \RuntimeException when no password encoder could be found for the user */ - function getEncoder($user); + public function getEncoder($user); } diff --git a/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php b/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php index dae6c69a7d..78b4e42a87 100644 --- a/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php +++ b/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php @@ -26,7 +26,7 @@ interface PasswordEncoderInterface * * @return string The encoded password */ - function encodePassword($raw, $salt); + public function encodePassword($raw, $salt); /** * Checks a raw password against an encoded password. @@ -37,5 +37,5 @@ interface PasswordEncoderInterface * * @return Boolean true if the password is valid, false otherwise */ - function isPasswordValid($encoded, $raw, $salt); + public function isPasswordValid($encoded, $raw, $salt); } diff --git a/src/Symfony/Component/Security/Core/Role/RoleHierarchyInterface.php b/src/Symfony/Component/Security/Core/Role/RoleHierarchyInterface.php index d873b80302..c495a7f14d 100644 --- a/src/Symfony/Component/Security/Core/Role/RoleHierarchyInterface.php +++ b/src/Symfony/Component/Security/Core/Role/RoleHierarchyInterface.php @@ -28,5 +28,5 @@ interface RoleHierarchyInterface * * @return array An array of all reachable roles */ - function getReachableRoles(array $roles); + public function getReachableRoles(array $roles); } diff --git a/src/Symfony/Component/Security/Core/Role/RoleInterface.php b/src/Symfony/Component/Security/Core/Role/RoleInterface.php index debda3a3e4..a3cb26635f 100644 --- a/src/Symfony/Component/Security/Core/Role/RoleInterface.php +++ b/src/Symfony/Component/Security/Core/Role/RoleInterface.php @@ -31,5 +31,5 @@ interface RoleInterface * * @return string|null A string representation of the role, or null */ - function getRole(); + public function getRole(); } diff --git a/src/Symfony/Component/Security/Core/SecurityContext.php b/src/Symfony/Component/Security/Core/SecurityContext.php index bc6493b01d..1ec43e68ae 100644 --- a/src/Symfony/Component/Security/Core/SecurityContext.php +++ b/src/Symfony/Component/Security/Core/SecurityContext.php @@ -55,7 +55,7 @@ class SecurityContext implements SecurityContextInterface * * @return Boolean */ - public final function isGranted($attributes, $object = null) + final public function isGranted($attributes, $object = null) { if (null === $this->token) { throw new AuthenticationCredentialsNotFoundException('The security context contains no authentication token. One possible reason may be that there is no firewall configured for this URL.'); diff --git a/src/Symfony/Component/Security/Core/SecurityContextInterface.php b/src/Symfony/Component/Security/Core/SecurityContextInterface.php index 77c5bf8b65..78d6477484 100644 --- a/src/Symfony/Component/Security/Core/SecurityContextInterface.php +++ b/src/Symfony/Component/Security/Core/SecurityContextInterface.php @@ -29,14 +29,14 @@ interface SecurityContextInterface * * @return TokenInterface|null A TokenInterface instance or null if no authentication information is available */ - function getToken(); + public function getToken(); /** * Sets the authentication token. * * @param TokenInterface $token */ - function setToken(TokenInterface $token = null); + public function setToken(TokenInterface $token = null); /** * Checks if the attributes are granted against the current authentication token and optionally supplied object. @@ -46,5 +46,5 @@ interface SecurityContextInterface * * @return Boolean */ - function isGranted($attributes, $object = null); + public function isGranted($attributes, $object = null); } diff --git a/src/Symfony/Component/Security/Core/User/AdvancedUserInterface.php b/src/Symfony/Component/Security/Core/User/AdvancedUserInterface.php index e951c65eb0..5b3a51a191 100644 --- a/src/Symfony/Component/Security/Core/User/AdvancedUserInterface.php +++ b/src/Symfony/Component/Security/Core/User/AdvancedUserInterface.php @@ -47,7 +47,7 @@ interface AdvancedUserInterface extends UserInterface * * @see AccountExpiredException */ - function isAccountNonExpired(); + public function isAccountNonExpired(); /** * Checks whether the user is locked. @@ -59,7 +59,7 @@ interface AdvancedUserInterface extends UserInterface * * @see LockedException */ - function isAccountNonLocked(); + public function isAccountNonLocked(); /** * Checks whether the user's credentials (password) has expired. @@ -71,7 +71,7 @@ interface AdvancedUserInterface extends UserInterface * * @see CredentialsExpiredException */ - function isCredentialsNonExpired(); + public function isCredentialsNonExpired(); /** * Checks whether the user is enabled. @@ -83,5 +83,5 @@ interface AdvancedUserInterface extends UserInterface * * @see DisabledException */ - function isEnabled(); + public function isEnabled(); } diff --git a/src/Symfony/Component/Security/Core/User/EquatableInterface.php b/src/Symfony/Component/Security/Core/User/EquatableInterface.php index e2bde9e066..645b77c142 100644 --- a/src/Symfony/Component/Security/Core/User/EquatableInterface.php +++ b/src/Symfony/Component/Security/Core/User/EquatableInterface.php @@ -33,5 +33,5 @@ interface EquatableInterface * * @return Boolean */ - function isEqualTo(UserInterface $user); + public function isEqualTo(UserInterface $user); } diff --git a/src/Symfony/Component/Security/Core/User/UserCheckerInterface.php b/src/Symfony/Component/Security/Core/User/UserCheckerInterface.php index 61f0f6eaa1..3dd8d51bf5 100644 --- a/src/Symfony/Component/Security/Core/User/UserCheckerInterface.php +++ b/src/Symfony/Component/Security/Core/User/UserCheckerInterface.php @@ -25,12 +25,12 @@ interface UserCheckerInterface * * @param UserInterface $user a UserInterface instance */ - function checkPreAuth(UserInterface $user); + public function checkPreAuth(UserInterface $user); /** * Checks the user account after authentication. * * @param UserInterface $user a UserInterface instance */ - function checkPostAuth(UserInterface $user); + public function checkPostAuth(UserInterface $user); } diff --git a/src/Symfony/Component/Security/Core/User/UserInterface.php b/src/Symfony/Component/Security/Core/User/UserInterface.php index ce3b3a8bac..ed96ca9a57 100644 --- a/src/Symfony/Component/Security/Core/User/UserInterface.php +++ b/src/Symfony/Component/Security/Core/User/UserInterface.php @@ -47,7 +47,7 @@ interface UserInterface * * @return Role[] The user roles */ - function getRoles(); + public function getRoles(); /** * Returns the password used to authenticate the user. @@ -57,7 +57,7 @@ interface UserInterface * * @return string The password */ - function getPassword(); + public function getPassword(); /** * Returns the salt that was originally used to encode the password. @@ -66,14 +66,14 @@ interface UserInterface * * @return string The salt */ - function getSalt(); + public function getSalt(); /** * Returns the username used to authenticate the user. * * @return string The username */ - function getUsername(); + public function getUsername(); /** * Removes sensitive data from the user. @@ -83,5 +83,5 @@ interface UserInterface * * @return void */ - function eraseCredentials(); + public function eraseCredentials(); } diff --git a/src/Symfony/Component/Security/Core/User/UserProviderInterface.php b/src/Symfony/Component/Security/Core/User/UserProviderInterface.php index dbd7924a96..6669c437af 100644 --- a/src/Symfony/Component/Security/Core/User/UserProviderInterface.php +++ b/src/Symfony/Component/Security/Core/User/UserProviderInterface.php @@ -48,7 +48,7 @@ interface UserProviderInterface * @throws UsernameNotFoundException if the user is not found * */ - function loadUserByUsername($username); + public function loadUserByUsername($username); /** * Refreshes the user for the account interface. @@ -63,7 +63,7 @@ interface UserProviderInterface * * @throws UnsupportedUserException if the account is not supported */ - function refreshUser(UserInterface $user); + public function refreshUser(UserInterface $user); /** * Whether this provider supports the given user class @@ -72,5 +72,5 @@ interface UserProviderInterface * * @return Boolean */ - function supportsClass($class); + public function supportsClass($class); } diff --git a/src/Symfony/Component/Security/Http/AccessMapInterface.php b/src/Symfony/Component/Security/Http/AccessMapInterface.php index dbd7282540..7d15feeb0c 100644 --- a/src/Symfony/Component/Security/Http/AccessMapInterface.php +++ b/src/Symfony/Component/Security/Http/AccessMapInterface.php @@ -29,5 +29,5 @@ interface AccessMapInterface * * @return array A tuple of security attributes and the required channel */ - function getPatterns(Request $request); + public function getPatterns(Request $request); } diff --git a/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php b/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php index 9cd74964c5..5bb00deec7 100644 --- a/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php @@ -35,5 +35,5 @@ interface AuthenticationFailureHandlerInterface * * @return Response|null the response to return */ - function onAuthenticationFailure(Request $request, AuthenticationException $exception); + public function onAuthenticationFailure(Request $request, AuthenticationException $exception); } diff --git a/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php b/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php index 8917f3e7ea..bf03cd62ec 100644 --- a/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php @@ -35,5 +35,5 @@ interface AuthenticationSuccessHandlerInterface * * @return Response|null the response to return */ - function onAuthenticationSuccess(Request $request, TokenInterface $token); + public function onAuthenticationSuccess(Request $request, TokenInterface $token); } diff --git a/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php b/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php index 8670cbb809..a10a5d0f9d 100644 --- a/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php @@ -30,5 +30,5 @@ interface AccessDeniedHandlerInterface * * @return Response may return null */ - function handle(Request $request, AccessDeniedException $accessDeniedException); + public function handle(Request $request, AccessDeniedException $accessDeniedException); } diff --git a/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php b/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php index 9fc3501952..d190fc7b88 100644 --- a/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php +++ b/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php @@ -30,5 +30,5 @@ interface AuthenticationEntryPointInterface * * @return Response */ - function start(Request $request, AuthenticationException $authException = null); + public function start(Request $request, AuthenticationException $authException = null); } diff --git a/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php index 1caaf0af0b..c9fa328d26 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php @@ -119,7 +119,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface * * @param GetResponseEvent $event A GetResponseEvent instance */ - public final function handle(GetResponseEvent $event) + final public function handle(GetResponseEvent $event) { $request = $event->getRequest(); diff --git a/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php b/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php index 66d0ea1745..66041be7b6 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php @@ -51,7 +51,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface * * @param GetResponseEvent $event A GetResponseEvent instance */ - public final function handle(GetResponseEvent $event) + final public function handle(GetResponseEvent $event) { $request = $event->getRequest(); diff --git a/src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php b/src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php index ccde86e6d6..b67047405b 100644 --- a/src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php +++ b/src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php @@ -25,5 +25,5 @@ interface ListenerInterface * * @param GetResponseEvent $event */ - function handle(GetResponseEvent $event); + public function handle(GetResponseEvent $event); } diff --git a/src/Symfony/Component/Security/Http/FirewallMapInterface.php b/src/Symfony/Component/Security/Http/FirewallMapInterface.php index 5a42ff1309..336125f58c 100644 --- a/src/Symfony/Component/Security/Http/FirewallMapInterface.php +++ b/src/Symfony/Component/Security/Http/FirewallMapInterface.php @@ -34,5 +34,5 @@ interface FirewallMapInterface * * @return array of the format array(array(AuthenticationListener), ExceptionListener) */ - function getListeners(Request $request); + public function getListeners(Request $request); } diff --git a/src/Symfony/Component/Security/Http/Logout/LogoutHandlerInterface.php b/src/Symfony/Component/Security/Http/Logout/LogoutHandlerInterface.php index 71be38805a..5e1cea81df 100644 --- a/src/Symfony/Component/Security/Http/Logout/LogoutHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Logout/LogoutHandlerInterface.php @@ -31,5 +31,5 @@ interface LogoutHandlerInterface * @param Response $response * @param TokenInterface $token */ - function logout(Request $request, Response $response, TokenInterface $token); + public function logout(Request $request, Response $response, TokenInterface $token); } diff --git a/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php b/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php index fb1dd6417e..61642a8b5f 100644 --- a/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php @@ -33,5 +33,5 @@ interface LogoutSuccessHandlerInterface * * @return Response never null */ - function onLogoutSuccess(Request $request); + public function onLogoutSuccess(Request $request); } diff --git a/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php b/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php index d61a6cec51..4f7c5b989e 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php +++ b/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php @@ -91,7 +91,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface * * @return TokenInterface */ - public final function autoLogin(Request $request) + final public function autoLogin(Request $request) { if (null === $cookie = $request->cookies->get($this->options['name'])) { return; @@ -156,7 +156,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface * * @param Request $request */ - public final function loginFail(Request $request) + final public function loginFail(Request $request) { $this->cancelCookie($request); $this->onLoginFail($request); @@ -170,7 +170,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface * @param Response $response * @param TokenInterface $token The token that resulted in a successful authentication */ - public final function loginSuccess(Request $request, Response $response, TokenInterface $token) + final public function loginSuccess(Request $request, Response $response, TokenInterface $token) { if (!$token->getUser() instanceof UserInterface) { if (null !== $this->logger) { @@ -221,7 +221,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface */ abstract protected function onLoginSuccess(Request $request, Response $response, TokenInterface $token); - protected final function getUserProvider($class) + final protected function getUserProvider($class) { foreach ($this->userProviders as $provider) { if ($provider->supportsClass($class)) { diff --git a/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php b/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php index 0497c6974b..a00dcefb10 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php +++ b/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php @@ -51,7 +51,7 @@ interface RememberMeServicesInterface * * @return TokenInterface */ - function autoLogin(Request $request); + public function autoLogin(Request $request); /** * Called whenever an interactive authentication attempt was made, but the @@ -61,7 +61,7 @@ interface RememberMeServicesInterface * * @param Request $request */ - function loginFail(Request $request); + public function loginFail(Request $request); /** * Called whenever an interactive authentication attempt is successful @@ -78,5 +78,5 @@ interface RememberMeServicesInterface * @param Response $response * @param TokenInterface $token */ - function loginSuccess(Request $request, Response $response, TokenInterface $token); + public function loginSuccess(Request $request, Response $response, TokenInterface $token); } diff --git a/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategyInterface.php b/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategyInterface.php index 34f5089b7d..2bc292bc84 100644 --- a/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategyInterface.php +++ b/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategyInterface.php @@ -33,5 +33,5 @@ interface SessionAuthenticationStrategyInterface * @param Request $request * @param TokenInterface $token */ - function onAuthentication(Request $request, TokenInterface $token); + public function onAuthentication(Request $request, TokenInterface $token); } diff --git a/src/Symfony/Component/Security/Tests/Acl/Domain/SecurityIdentityRetrievalStrategyTest.php b/src/Symfony/Component/Security/Tests/Acl/Domain/SecurityIdentityRetrievalStrategyTest.php index 2083728c67..f649653db0 100644 --- a/src/Symfony/Component/Security/Tests/Acl/Domain/SecurityIdentityRetrievalStrategyTest.php +++ b/src/Symfony/Component/Security/Tests/Acl/Domain/SecurityIdentityRetrievalStrategyTest.php @@ -116,7 +116,6 @@ class SecurityIdentityRetrievalStrategyTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($username)) ; - return $account; } @@ -177,7 +176,6 @@ class SecurityIdentityRetrievalStrategyTest extends \PHPUnit_Framework_TestCase ; } - return new SecurityIdentityRetrievalStrategy($roleHierarchy, $trustResolver); } } diff --git a/src/Symfony/Component/Security/Tests/Core/Authentication/Provider/DaoAuthenticationProviderTest.php b/src/Symfony/Component/Security/Tests/Core/Authentication/Provider/DaoAuthenticationProviderTest.php index 8bff3540e3..4da0337193 100644 --- a/src/Symfony/Component/Security/Tests/Core/Authentication/Provider/DaoAuthenticationProviderTest.php +++ b/src/Symfony/Component/Security/Tests/Core/Authentication/Provider/DaoAuthenticationProviderTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Security\Tests\Core\Authentication\Provider; - use Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder; use Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider; diff --git a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php b/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php index f312b3bf11..21a367803c 100644 --- a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php +++ b/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php @@ -26,7 +26,7 @@ interface DecoderInterface * * @return mixed */ - function decode($data, $format); + public function decode($data, $format); /** * Checks whether the serializer can decode from given format @@ -34,5 +34,5 @@ interface DecoderInterface * @param string $format format name * @return Boolean */ - function supportsDecoding($format); + public function supportsDecoding($format); } diff --git a/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php b/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php index 302db2f7c3..b4739edd6a 100644 --- a/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php +++ b/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php @@ -26,7 +26,7 @@ interface EncoderInterface * * @return scalar */ - function encode($data, $format); + public function encode($data, $format); /** * Checks whether the serializer can encode to given format @@ -34,5 +34,5 @@ interface EncoderInterface * @param string $format format name * @return Boolean */ - function supportsEncoding($format); + public function supportsEncoding($format); } diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php index e53b0956c7..3f3bf88323 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php @@ -33,5 +33,5 @@ interface DenormalizableInterface * @param string|null $format The format is optionally given to be able to denormalize differently * based on different input formats. */ - function denormalize(DenormalizerInterface $denormalizer, $data, $format = null); + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null); } diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php index b7e73544c7..7c4fd4f8f8 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php @@ -26,7 +26,7 @@ interface DenormalizerInterface * @param string $format format the given data was extracted from * @return object */ - function denormalize($data, $class, $format = null); + public function denormalize($data, $class, $format = null); /** * Checks whether the given class is supported for denormalization by this normalizer @@ -36,5 +36,5 @@ interface DenormalizerInterface * @param string $format The format being deserialized from. * @return Boolean */ - function supportsDenormalization($data, $type, $format = null); + public function supportsDenormalization($data, $type, $format = null); } diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php index 71ae28b681..b7b8e51a7e 100644 --- a/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php @@ -33,5 +33,5 @@ interface NormalizableInterface * based on different output formats. * @return array|scalar */ - function normalize(NormalizerInterface $normalizer, $format = null); + public function normalize(NormalizerInterface $normalizer, $format = null); } diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php index 4ca8609144..7b90d18e1f 100644 --- a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php @@ -25,7 +25,7 @@ interface NormalizerInterface * @param string $format format the normalization result will be encoded as * @return array|scalar */ - function normalize($object, $format = null); + public function normalize($object, $format = null); /** * Checks whether the given class is supported for normalization by this normalizer @@ -34,5 +34,5 @@ interface NormalizerInterface * @param string $format The format being (de-)serialized from or into. * @return Boolean */ - function supportsNormalization($data, $format = null); + public function supportsNormalization($data, $format = null); } diff --git a/src/Symfony/Component/Serializer/Serializer.php b/src/Symfony/Component/Serializer/Serializer.php index df9dd63326..77500a1064 100644 --- a/src/Symfony/Component/Serializer/Serializer.php +++ b/src/Symfony/Component/Serializer/Serializer.php @@ -63,7 +63,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - public final function serialize($data, $format) + final public function serialize($data, $format) { if (!$this->supportsEncoding($format)) { throw new UnexpectedValueException('Serialization for the format '.$format.' is not supported'); @@ -81,7 +81,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - public final function deserialize($data, $type, $format) + final public function deserialize($data, $type, $format) { if (!$this->supportsDecoding($format)) { throw new UnexpectedValueException('Deserialization for the format '.$format.' is not supported'); @@ -195,7 +195,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - public final function encode($data, $format) + final public function encode($data, $format) { return $this->getEncoder($format)->encode($data, $format); } @@ -203,7 +203,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz /** * {@inheritdoc} */ - public final function decode($data, $format) + final public function decode($data, $format) { return $this->getEncoder($format)->decode($data, $format); } diff --git a/src/Symfony/Component/Serializer/SerializerAwareInterface.php b/src/Symfony/Component/Serializer/SerializerAwareInterface.php index d589e8d0f5..dd0bb60d1a 100644 --- a/src/Symfony/Component/Serializer/SerializerAwareInterface.php +++ b/src/Symfony/Component/Serializer/SerializerAwareInterface.php @@ -25,5 +25,5 @@ interface SerializerAwareInterface * * @param SerializerInterface $serializer */ - function setSerializer(SerializerInterface $serializer); + public function setSerializer(SerializerInterface $serializer); } diff --git a/src/Symfony/Component/Serializer/SerializerInterface.php b/src/Symfony/Component/Serializer/SerializerInterface.php index 9e2ac98721..f1879596e1 100644 --- a/src/Symfony/Component/Serializer/SerializerInterface.php +++ b/src/Symfony/Component/Serializer/SerializerInterface.php @@ -25,7 +25,7 @@ interface SerializerInterface * @param string $format format name * @return string */ - function serialize($data, $format); + public function serialize($data, $format); /** * Deserializes data into the given type. @@ -34,5 +34,5 @@ interface SerializerInterface * @param string $type * @param string $format */ - function deserialize($data, $type, $format); + public function deserialize($data, $type, $format); } diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php index b510a3718c..468d444876 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php @@ -17,7 +17,7 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; class DenormalizableDummy implements DenormalizableInterface { - function denormalize(DenormalizerInterface $denormalizer, $data, $format = null) + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null) { } diff --git a/src/Symfony/Component/Templating/Asset/PackageInterface.php b/src/Symfony/Component/Templating/Asset/PackageInterface.php index a3dcde979b..a9ec65aecb 100644 --- a/src/Symfony/Component/Templating/Asset/PackageInterface.php +++ b/src/Symfony/Component/Templating/Asset/PackageInterface.php @@ -23,7 +23,7 @@ interface PackageInterface * * @return string The version string */ - function getVersion(); + public function getVersion(); /** * Returns an absolute or root-relative public path. @@ -32,5 +32,5 @@ interface PackageInterface * * @return string The public path */ - function getUrl($path); + public function getUrl($path); } diff --git a/src/Symfony/Component/Templating/DebuggerInterface.php b/src/Symfony/Component/Templating/DebuggerInterface.php index 93e3f45095..43026620ec 100644 --- a/src/Symfony/Component/Templating/DebuggerInterface.php +++ b/src/Symfony/Component/Templating/DebuggerInterface.php @@ -24,5 +24,5 @@ interface DebuggerInterface * * @param string $message A message to log */ - function log($message); + public function log($message); } diff --git a/src/Symfony/Component/Templating/EngineInterface.php b/src/Symfony/Component/Templating/EngineInterface.php index 3f3e29c379..dfa9c55efa 100644 --- a/src/Symfony/Component/Templating/EngineInterface.php +++ b/src/Symfony/Component/Templating/EngineInterface.php @@ -44,7 +44,7 @@ interface EngineInterface * * @api */ - function render($name, array $parameters = array()); + public function render($name, array $parameters = array()); /** * Returns true if the template exists. @@ -55,7 +55,7 @@ interface EngineInterface * * @api */ - function exists($name); + public function exists($name); /** * Returns true if this class is able to render the given template. @@ -66,5 +66,5 @@ interface EngineInterface * * @api */ - function supports($name); + public function supports($name); } diff --git a/src/Symfony/Component/Templating/Helper/HelperInterface.php b/src/Symfony/Component/Templating/Helper/HelperInterface.php index 650a83d5a8..eeb6730da8 100644 --- a/src/Symfony/Component/Templating/Helper/HelperInterface.php +++ b/src/Symfony/Component/Templating/Helper/HelperInterface.php @@ -27,7 +27,7 @@ interface HelperInterface * * @api */ - function getName(); + public function getName(); /** * Sets the default charset. @@ -36,7 +36,7 @@ interface HelperInterface * * @api */ - function setCharset($charset); + public function setCharset($charset); /** * Gets the default charset. @@ -45,5 +45,5 @@ interface HelperInterface * * @api */ - function getCharset(); + public function getCharset(); } diff --git a/src/Symfony/Component/Templating/Loader/FilesystemLoader.php b/src/Symfony/Component/Templating/Loader/FilesystemLoader.php index 3f3d4c269b..d5cf32a0d1 100644 --- a/src/Symfony/Component/Templating/Loader/FilesystemLoader.php +++ b/src/Symfony/Component/Templating/Loader/FilesystemLoader.php @@ -108,7 +108,7 @@ class FilesystemLoader extends Loader * * @return true if the path exists and is absolute, false otherwise */ - static protected function isAbsolutePath($file) + protected static function isAbsolutePath($file) { if ($file[0] == '/' || $file[0] == '\\' || (strlen($file) > 3 && ctype_alpha($file[0]) diff --git a/src/Symfony/Component/Templating/Loader/LoaderInterface.php b/src/Symfony/Component/Templating/Loader/LoaderInterface.php index 0e5192c63d..4b6d52562d 100644 --- a/src/Symfony/Component/Templating/Loader/LoaderInterface.php +++ b/src/Symfony/Component/Templating/Loader/LoaderInterface.php @@ -31,7 +31,7 @@ interface LoaderInterface * * @api */ - function load(TemplateReferenceInterface $template); + public function load(TemplateReferenceInterface $template); /** * Returns true if the template is still fresh. @@ -43,5 +43,5 @@ interface LoaderInterface * * @api */ - function isFresh(TemplateReferenceInterface $template, $time); + public function isFresh(TemplateReferenceInterface $template, $time); } diff --git a/src/Symfony/Component/Templating/StreamingEngineInterface.php b/src/Symfony/Component/Templating/StreamingEngineInterface.php index 4b6b303bd3..2911949d6c 100644 --- a/src/Symfony/Component/Templating/StreamingEngineInterface.php +++ b/src/Symfony/Component/Templating/StreamingEngineInterface.php @@ -28,5 +28,5 @@ interface StreamingEngineInterface * * @throws \RuntimeException if the template cannot be rendered */ - function stream($name, array $parameters = array()); + public function stream($name, array $parameters = array()); } diff --git a/src/Symfony/Component/Templating/TemplateNameParserInterface.php b/src/Symfony/Component/Templating/TemplateNameParserInterface.php index bdc406535d..6305f43be2 100644 --- a/src/Symfony/Component/Templating/TemplateNameParserInterface.php +++ b/src/Symfony/Component/Templating/TemplateNameParserInterface.php @@ -30,5 +30,5 @@ interface TemplateNameParserInterface * * @api */ - function parse($name); + public function parse($name); } diff --git a/src/Symfony/Component/Templating/TemplateReferenceInterface.php b/src/Symfony/Component/Templating/TemplateReferenceInterface.php index 0f04742c44..60c910a1cd 100644 --- a/src/Symfony/Component/Templating/TemplateReferenceInterface.php +++ b/src/Symfony/Component/Templating/TemplateReferenceInterface.php @@ -27,7 +27,7 @@ interface TemplateReferenceInterface * * @api */ - function all(); + public function all(); /** * Sets a template parameter. @@ -41,7 +41,7 @@ interface TemplateReferenceInterface * * @api */ - function set($name, $value); + public function set($name, $value); /** * Gets a template parameter. @@ -54,7 +54,7 @@ interface TemplateReferenceInterface * * @api */ - function get($name); + public function get($name); /** * Returns the path to the template. @@ -65,7 +65,7 @@ interface TemplateReferenceInterface * * @api */ - function getPath(); + public function getPath(); /** * Returns the "logical" template name. @@ -76,5 +76,5 @@ interface TemplateReferenceInterface * * @api */ - function getLogicalName(); + public function getLogicalName(); } diff --git a/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php b/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php index 7985de191d..3168a62289 100644 --- a/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php +++ b/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php @@ -17,9 +17,9 @@ use Symfony\Component\Templating\TemplateReference; class FilesystemLoaderTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } @@ -78,7 +78,7 @@ class ProjectTemplateLoader2 extends FilesystemLoader return $this->templatePathPatterns; } - static public function isAbsolutePath($path) + public static function isAbsolutePath($path) { return parent::isAbsolutePath($path); } diff --git a/src/Symfony/Component/Translation/Dumper/DumperInterface.php b/src/Symfony/Component/Translation/Dumper/DumperInterface.php index 148b0820c1..cebc65ed89 100644 --- a/src/Symfony/Component/Translation/Dumper/DumperInterface.php +++ b/src/Symfony/Component/Translation/Dumper/DumperInterface.php @@ -27,5 +27,5 @@ interface DumperInterface * @param MessageCatalogue $messages The message catalogue * @param array $options Options that are used by the dumper */ - function dump(MessageCatalogue $messages, $options = array()); + public function dump(MessageCatalogue $messages, $options = array()); } diff --git a/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php b/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php index d0a20edbfa..270817e1db 100644 --- a/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php @@ -113,7 +113,7 @@ class IcuResFileDumper implements DumperInterface { $padding = strlen($data) % 4; - if ($padding ) { + if ($padding) { return str_repeat("\xAA", 4 - $padding); } } diff --git a/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php b/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php index 5378a66071..6f877c31e7 100644 --- a/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php +++ b/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php @@ -27,12 +27,12 @@ interface ExtractorInterface * @param string $directory The path to look into * @param MessageCatalogue $catalogue The catalogue */ - function extract($directory, MessageCatalogue $catalogue); + public function extract($directory, MessageCatalogue $catalogue); /** * Sets the prefix that should be used for new found messages. * * @param string $prefix The prefix */ - function setPrefix($prefix); + public function setPrefix($prefix); } diff --git a/src/Symfony/Component/Translation/Interval.php b/src/Symfony/Component/Translation/Interval.php index 078e1a4a8e..34532c1d5c 100644 --- a/src/Symfony/Component/Translation/Interval.php +++ b/src/Symfony/Component/Translation/Interval.php @@ -39,7 +39,7 @@ class Interval * @param integer $number A number * @param string $interval An interval */ - static public function test($number, $interval) + public static function test($number, $interval) { $interval = trim($interval); @@ -71,7 +71,7 @@ class Interval * * @return string A Regexp (without the delimiters) */ - static public function getIntervalRegexp() + public static function getIntervalRegexp() { return <<classes[$metadata->getClassName()]; if (isset($yaml['group_sequence_provider'])) { - $metadata->setGroupSequenceProvider((bool)$yaml['group_sequence_provider']); + $metadata->setGroupSequenceProvider((bool) $yaml['group_sequence_provider']); } if (isset($yaml['constraints']) && is_array($yaml['constraints'])) { diff --git a/src/Symfony/Component/Validator/ObjectInitializerInterface.php b/src/Symfony/Component/Validator/ObjectInitializerInterface.php index 224552d707..424ff0b624 100644 --- a/src/Symfony/Component/Validator/ObjectInitializerInterface.php +++ b/src/Symfony/Component/Validator/ObjectInitializerInterface.php @@ -30,5 +30,5 @@ interface ObjectInitializerInterface * * @api */ - function initialize($object); + public function initialize($object); } diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php index ec4e6c5241..f0381287e0 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Validator\Tests\Constraints; - use Symfony\Component\Validator\ExecutionContext; use Symfony\Component\Validator\Constraints\Min; use Symfony\Component\Validator\Constraints\Max; @@ -57,7 +56,6 @@ class AllValidatorTest extends \PHPUnit_Framework_TestCase $this->validator->validate(null, new All(new Min(4))); } - /** * @expectedException Symfony\Component\Validator\Exception\UnexpectedTypeException */ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php index 269d5a2c01..bd56e15ff0 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php @@ -112,7 +112,6 @@ class CallbackValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 'baz', )); - $this->validator->validate($object, new Callback(array( 'validateOne', 'validateTwo' ))); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php index fd5b1dc0e9..34221ffda2 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Validator\Tests\Constraints; - use Symfony\Component\Validator\ExecutionContext; use Symfony\Component\Validator\Constraints\Choice; use Symfony\Component\Validator\Constraints\ChoiceValidator; diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php index 7af7993686..ef1c7c951d 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Validator\Tests\Constraints; - use Symfony\Component\Validator\ExecutionContext; use Symfony\Component\Validator\Constraints\Min; use Symfony\Component\Validator\Constraints\NotNull; diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php index 0e4401e4c4..85db95ddca 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php @@ -106,4 +106,3 @@ class NotBlankValidatorTest extends \PHPUnit_Framework_TestCase $this->validator->validate(array(), $constraint); } } - diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php index 702a904d51..30fa92016c 100644 --- a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php +++ b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php @@ -17,7 +17,7 @@ use Symfony\Component\Validator\ExecutionContext; class ConstraintAValidator extends ConstraintValidator { - static public $passedContext; + public static $passedContext; public function initialize(ExecutionContext $context) { diff --git a/src/Symfony/Component/Validator/Tests/Mapping/GetterMetadataTest.php b/src/Symfony/Component/Validator/Tests/Mapping/GetterMetadataTest.php index bca10763a7..99303e9f09 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/GetterMetadataTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/GetterMetadataTest.php @@ -36,4 +36,3 @@ class GetterMetadataTest extends \PHPUnit_Framework_TestCase $this->assertEquals('foobar from getter', $metadata->getValue($entity)); } } - diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/LoaderChainTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/LoaderChainTest.php index 142bebda65..647a568c2c 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/LoaderChainTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/LoaderChainTest.php @@ -82,4 +82,3 @@ class LoaderChainTest extends \PHPUnit_Framework_TestCase $this->assertFalse($chain->loadClassMetadata($metadata)); } } - diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php index 5ddb90dbfc..f6269ed0db 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php @@ -59,7 +59,7 @@ class StaticMethodLoaderTest extends \PHPUnit_Framework_TestCase class StaticLoaderEntity { - static public $invokedWith = null; + public static $invokedWith = null; public static function loadMetadata(ClassMetadata $metadata) { @@ -73,7 +73,7 @@ class StaticLoaderDocument extends BaseStaticLoaderDocument class BaseStaticLoaderDocument { - static public function loadMetadata(ClassMetadata $metadata) + public static function loadMetadata(ClassMetadata $metadata) { $metadata->addConstraint(new ConstraintA()); } diff --git a/src/Symfony/Component/Validator/Tests/Mapping/PropertyMetadataTest.php b/src/Symfony/Component/Validator/Tests/Mapping/PropertyMetadataTest.php index 4c2a1c65a2..0dc1bb6b31 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/PropertyMetadataTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/PropertyMetadataTest.php @@ -33,4 +33,3 @@ class PropertyMetadataTest extends \PHPUnit_Framework_TestCase $this->assertEquals('foobar', $metadata->getValue($entity)); } } - diff --git a/src/Symfony/Component/Validator/ValidatorContextInterface.php b/src/Symfony/Component/Validator/ValidatorContextInterface.php index c93d9edd39..ffe8b8f510 100644 --- a/src/Symfony/Component/Validator/ValidatorContextInterface.php +++ b/src/Symfony/Component/Validator/ValidatorContextInterface.php @@ -35,19 +35,19 @@ interface ValidatorContextInterface * * @param ClassMetadataFactoryInterface $classMetadataFactory The factory instance */ - function setClassMetadataFactory(ClassMetadataFactoryInterface $classMetadataFactory); + public function setClassMetadataFactory(ClassMetadataFactoryInterface $classMetadataFactory); /** * Sets the constraint validator factory used in the new validator * * @param ConstraintValidatorFactoryInterface $constraintValidatorFactory The factory instance */ - function setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $constraintValidatorFactory); + public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $constraintValidatorFactory); /** * Creates a new validator with the settings stored in this context * * @return ValidatorInterface The new validator */ - function getValidator(); + public function getValidator(); } diff --git a/src/Symfony/Component/Validator/ValidatorFactory.php b/src/Symfony/Component/Validator/ValidatorFactory.php index 9f5fc5b2c6..d48d484626 100644 --- a/src/Symfony/Component/Validator/ValidatorFactory.php +++ b/src/Symfony/Component/Validator/ValidatorFactory.php @@ -98,7 +98,7 @@ class ValidatorFactory implements ValidatorContextInterface * has neither the extension ".xml" nor * ".yml" nor ".yaml" */ - static public function buildDefault(array $mappingFiles = array(), $annotations = false, $staticMethod = null) + public static function buildDefault(array $mappingFiles = array(), $annotations = false, $staticMethod = null) { $xmlMappingFiles = array(); $yamlMappingFiles = array(); diff --git a/src/Symfony/Component/Validator/ValidatorInterface.php b/src/Symfony/Component/Validator/ValidatorInterface.php index fc645c1001..5e2e33ebed 100644 --- a/src/Symfony/Component/Validator/ValidatorInterface.php +++ b/src/Symfony/Component/Validator/ValidatorInterface.php @@ -32,7 +32,7 @@ interface ValidatorInterface * * @api */ - function validate($object, $groups = null); + public function validate($object, $groups = null); /** * Validate a single property of an object against its current value. @@ -45,7 +45,7 @@ interface ValidatorInterface * * @api */ - function validateProperty($object, $property, $groups = null); + public function validateProperty($object, $property, $groups = null); /** * Validate a single property of an object against the given value. @@ -59,7 +59,7 @@ interface ValidatorInterface * * @api */ - function validatePropertyValue($class, $property, $value, $groups = null); + public function validatePropertyValue($class, $property, $value, $groups = null); /** * Validates a given value against a specific Constraint. @@ -72,7 +72,7 @@ interface ValidatorInterface * * @api */ - function validateValue($value, Constraint $constraint, $groups = null); + public function validateValue($value, Constraint $constraint, $groups = null); /** * Returns the factory for ClassMetadata instances @@ -81,5 +81,5 @@ interface ValidatorInterface * * @api */ - function getMetadataFactory(); + public function getMetadataFactory(); } diff --git a/src/Symfony/Component/Yaml/Escaper.php b/src/Symfony/Component/Yaml/Escaper.php index 81a7d5fe1b..fe9f33ff0f 100644 --- a/src/Symfony/Component/Yaml/Escaper.php +++ b/src/Symfony/Component/Yaml/Escaper.php @@ -25,13 +25,13 @@ class Escaper // first to ensure proper escaping because str_replace operates iteratively // on the input arrays. This ordering of the characters avoids the use of strtr, // which performs more slowly. - static private $escapees = array('\\\\', '\\"', + private static $escapees = array('\\\\', '\\"', "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", "\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"); - static private $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", @@ -45,7 +45,7 @@ class Escaper * * @return Boolean True if the value would require double quotes. */ - static public function requiresDoubleQuoting($value) + public static function requiresDoubleQuoting($value) { return preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value); } @@ -57,7 +57,7 @@ class Escaper * * @return string The quoted, escaped string */ - static public function escapeWithDoubleQuotes($value) + public static function escapeWithDoubleQuotes($value) { return sprintf('"%s"', str_replace(self::$escapees, self::$escaped, $value)); } @@ -69,7 +69,7 @@ class Escaper * * @return Boolean True if the value would require single quotes. */ - static public function requiresSingleQuoting($value) + public static function requiresSingleQuoting($value) { return preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ - ? | < > = ! % @ ` ]/x', $value); } @@ -81,7 +81,7 @@ class Escaper * * @return string The quoted, escaped string */ - static public function escapeWithSingleQuotes($value) + public static function escapeWithSingleQuotes($value) { return sprintf("'%s'", str_replace('\'', '\'\'', $value)); } diff --git a/src/Symfony/Component/Yaml/Inline.php b/src/Symfony/Component/Yaml/Inline.php index 8bcfcda62b..df8928577c 100644 --- a/src/Symfony/Component/Yaml/Inline.php +++ b/src/Symfony/Component/Yaml/Inline.php @@ -29,7 +29,7 @@ class Inline * * @return array A PHP array representing the YAML string */ - static public function parse($value) + public static function parse($value) { $value = trim($value); @@ -75,7 +75,7 @@ class Inline * * @throws DumpException When trying to dump PHP resource */ - static public function dump($value) + public static function dump($value) { switch (true) { case is_resource($value): @@ -125,7 +125,7 @@ class Inline * * @return string The YAML string representing the PHP array */ - static private function dumpArray($value) + private static function dumpArray($value) { // array $keys = array_keys($value); @@ -162,7 +162,7 @@ class Inline * * @throws ParseException When malformed inline YAML string is parsed */ - static public function parseScalar($scalar, $delimiters = null, $stringDelimiters = array('"', "'"), &$i = 0, $evaluate = true) + public static function parseScalar($scalar, $delimiters = null, $stringDelimiters = array('"', "'"), &$i = 0, $evaluate = true) { if (in_array($scalar[$i], $stringDelimiters)) { // quoted scalar @@ -207,7 +207,7 @@ class Inline * * @throws ParseException When malformed inline YAML string is parsed */ - static private function parseQuotedScalar($scalar, &$i) + private static function parseQuotedScalar($scalar, &$i) { // Only check the current item we're dealing with (for sequences) $subject = substr($scalar, $i); @@ -242,7 +242,7 @@ class Inline * * @throws ParseException When malformed inline YAML string is parsed */ - static private function parseSequence($sequence, &$i = 0) + private static function parseSequence($sequence, &$i = 0) { $output = array(); $len = strlen($sequence); @@ -298,7 +298,7 @@ class Inline * * @throws ParseException When malformed inline YAML string is parsed */ - static private function parseMapping($mapping, &$i = 0) + private static function parseMapping($mapping, &$i = 0) { $output = array(); $len = strlen($mapping); @@ -359,7 +359,7 @@ class Inline * * @return string A YAML string */ - static private function evaluateScalar($scalar) + private static function evaluateScalar($scalar) { $scalar = trim($scalar); @@ -404,7 +404,7 @@ class Inline * * @return string The regular expression */ - static private function getTimestampRegex() + private static function getTimestampRegex() { return << null, 'firstline' => 1, 'secondline' => 2) - diff --git a/src/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml b/src/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml index 3b3be25491..ec456ed09f 100644 --- a/src/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml +++ b/src/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml @@ -1 +1 @@ -value: \ No newline at end of file +value: diff --git a/src/Symfony/Component/Yaml/Unescaper.php b/src/Symfony/Component/Yaml/Unescaper.php index 0061dfdcc3..ac3a576b67 100644 --- a/src/Symfony/Component/Yaml/Unescaper.php +++ b/src/Symfony/Component/Yaml/Unescaper.php @@ -48,7 +48,7 @@ class Unescaper public function unescapeDoubleQuotedString($value) { $self = $this; - $callback = function($match) use($self) { + $callback = function($match) use ($self) { return $self->unescapeCharacter($match[0]); }; diff --git a/src/Symfony/Component/Yaml/Yaml.php b/src/Symfony/Component/Yaml/Yaml.php index 29e941343e..d35e67d62c 100644 --- a/src/Symfony/Component/Yaml/Yaml.php +++ b/src/Symfony/Component/Yaml/Yaml.php @@ -22,9 +22,9 @@ use Symfony\Component\Yaml\Exception\ParseException; */ class Yaml { - static public $enablePhpParsing = false; + public static $enablePhpParsing = false; - static public function enablePhpParsing() + public static function enablePhpParsing() { self::$enablePhpParsing = true; } @@ -49,7 +49,7 @@ class Yaml * * @api */ - static public function parse($input) + public static function parse($input) { // if input is a file, process it $file = ''; @@ -102,7 +102,7 @@ class Yaml * * @api */ - static public function dump($array, $inline = 2) + public static function dump($array, $inline = 2) { $yaml = new Dumper();