From efbba25577230bc0e56e12e19291a9630acf3398 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 2 Oct 2018 00:12:00 -0300 Subject: [PATCH] [CS] Enforces null type hint on last position in phpDocs --- .../AbstractDoctrineExtension.php | 2 +- .../Form/ChoiceList/DoctrineChoiceLoader.php | 2 +- .../Translation/PhpStringTokenParser.php | 2 +- .../Component/Console/Command/Command.php | 2 +- .../Component/Console/Helper/QuestionHelper.php | 2 +- .../Component/Console/Question/Question.php | 12 ++++++------ .../Component/CssSelector/Node/ElementNode.php | 4 ++-- .../Component/CssSelector/Node/SelectorNode.php | 4 ++-- .../Component/CssSelector/Parser/TokenStream.php | 2 +- src/Symfony/Component/Debug/ErrorHandler.php | 2 +- .../Component/DependencyInjection/Definition.php | 6 +++--- src/Symfony/Component/DomCrawler/Crawler.php | 2 +- src/Symfony/Component/Filesystem/Filesystem.php | 2 +- src/Symfony/Component/Form/Button.php | 2 +- .../Factory/ChoiceListFactoryInterface.php | 16 ++++++++-------- .../Factory/PropertyAccessDecorator.php | 16 ++++++++-------- .../Component/Form/ChoiceList/LazyChoiceList.php | 4 ++-- .../ChoiceList/Loader/ChoiceLoaderInterface.php | 6 +++--- .../Form/Extension/Csrf/CsrfExtension.php | 2 +- .../EventListener/CsrfValidationListener.php | 2 +- .../Csrf/Type/FormTypeCsrfExtension.php | 2 +- .../Validator/Type/UploadValidatorExtension.php | 2 +- .../Validator/ViolationMapper/MappingRule.php | 2 +- .../ViolationMapper/ViolationMapper.php | 2 +- .../Form/FormConfigBuilderInterface.php | 2 +- .../Component/Form/FormConfigInterface.php | 4 ++-- src/Symfony/Component/Form/FormTypeInterface.php | 2 +- src/Symfony/Component/Form/SubmitButton.php | 2 +- src/Symfony/Component/Form/Util/ServerParams.php | 2 +- .../HttpFoundation/BinaryFileResponse.php | 4 ++-- .../Component/HttpFoundation/HeaderBag.php | 2 +- .../Storage/Handler/PdoSessionHandler.php | 2 +- .../Component/HttpKernel/Config/FileLocator.php | 2 +- .../Profiler/MongoDbProfilerStorage.php | 2 +- .../Component/HttpKernel/Profiler/Profile.php | 2 +- src/Symfony/Component/Intl/Intl.php | 2 +- src/Symfony/Component/Process/Process.php | 6 +++--- src/Symfony/Component/Process/ProcessBuilder.php | 4 ++-- .../Component/Process/Tests/ProcessTest.php | 6 +++--- .../PropertyAccess/PropertyPathBuilder.php | 2 +- src/Symfony/Component/Routing/Route.php | 2 +- .../Component/Security/Csrf/CsrfTokenManager.php | 2 +- .../Security/Guard/GuardAuthenticatorHandler.php | 4 ++-- .../CamelCaseToSnakeCaseNameConverter.php | 2 +- src/Symfony/Component/Stopwatch/Section.php | 2 +- .../Translation/Catalogue/AbstractOperation.php | 2 +- .../Component/Validator/ExecutionContext.php | 4 ++-- .../Validator/ExecutionContextInterface.php | 4 ++-- src/Symfony/Component/Validator/Validator.php | 2 +- .../Component/Validator/ValidatorBuilder.php | 2 +- 50 files changed, 86 insertions(+), 86 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php index 736fa17bd1..7a2a7adab0 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php @@ -453,7 +453,7 @@ abstract class AbstractDoctrineExtension extends Extension /** * Search for a manager that is declared as 'auto_mapping' = true. * - * @return null|string The name of the manager. If no one manager is found, returns null + * @return string|null The name of the manager. If no one manager is found, returns null * * @throws \LogicException */ diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php index 43120c6258..ab92e61edd 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php @@ -45,7 +45,7 @@ class DoctrineChoiceLoader implements ChoiceLoaderInterface * @param ObjectManager $manager The object manager * @param string $class The class name of the loaded objects * @param IdReader $idReader The reader for the object IDs - * @param null|EntityLoaderInterface $objectLoader The objects loader + * @param EntityLoaderInterface|null $objectLoader The objects loader */ public function __construct(ChoiceListFactoryInterface $factory, ObjectManager $manager, $class, IdReader $idReader = null, EntityLoaderInterface $objectLoader = null) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php index 1071e14b71..c12f36c061 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php +++ b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php @@ -89,7 +89,7 @@ class PhpStringTokenParser * Parses escape sequences in strings (all string types apart from single quoted). * * @param string $str String without quotes - * @param null|string $quote Quote type + * @param string|null $quote Quote type * * @return string String with escape sequences parsed */ diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 70b4546fde..dc6fa509ad 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -140,7 +140,7 @@ class Command * execute() method, you set the code to execute by passing * a Closure to the setCode() method. * - * @return null|int null or 0 if everything went fine, or an error code + * @return int|null null or 0 if everything went fine, or an error code * * @throws LogicException When this abstract method is not implemented * diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index 61e3945c18..35974b06ae 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -109,7 +109,7 @@ class QuestionHelper extends Helper * * This method is public for PHP 5.3 compatibility, it should be private. * - * @return bool|mixed|null|string + * @return bool|mixed|string|null * * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden */ diff --git a/src/Symfony/Component/Console/Question/Question.php b/src/Symfony/Component/Console/Question/Question.php index b0f3a695ba..61c769af0a 100644 --- a/src/Symfony/Component/Console/Question/Question.php +++ b/src/Symfony/Component/Console/Question/Question.php @@ -117,7 +117,7 @@ class Question /** * Gets values for the autocompleter. * - * @return null|iterable + * @return iterable|null */ public function getAutocompleterValues() { @@ -127,7 +127,7 @@ class Question /** * Sets values for the autocompleter. * - * @param null|iterable $values + * @param iterable|null $values * * @return $this * @@ -156,7 +156,7 @@ class Question /** * Sets a validator for the question. * - * @param null|callable $validator + * @param callable|null $validator * * @return $this */ @@ -170,7 +170,7 @@ class Question /** * Gets the validator for the question. * - * @return null|callable + * @return callable|null */ public function getValidator() { @@ -182,7 +182,7 @@ class Question * * Null means an unlimited number of attempts. * - * @param null|int $attempts + * @param int|null $attempts * * @return $this * @@ -204,7 +204,7 @@ class Question * * Null means an unlimited number of attempts. * - * @return null|int + * @return int|null */ public function getMaxAttempts() { diff --git a/src/Symfony/Component/CssSelector/Node/ElementNode.php b/src/Symfony/Component/CssSelector/Node/ElementNode.php index bcdce7a7a5..54869af6cd 100644 --- a/src/Symfony/Component/CssSelector/Node/ElementNode.php +++ b/src/Symfony/Component/CssSelector/Node/ElementNode.php @@ -37,7 +37,7 @@ class ElementNode extends AbstractNode } /** - * @return null|string + * @return string|null */ public function getNamespace() { @@ -45,7 +45,7 @@ class ElementNode extends AbstractNode } /** - * @return null|string + * @return string|null */ public function getElement() { diff --git a/src/Symfony/Component/CssSelector/Node/SelectorNode.php b/src/Symfony/Component/CssSelector/Node/SelectorNode.php index 5ef2be62a4..057107f6f5 100644 --- a/src/Symfony/Component/CssSelector/Node/SelectorNode.php +++ b/src/Symfony/Component/CssSelector/Node/SelectorNode.php @@ -28,7 +28,7 @@ class SelectorNode extends AbstractNode /** * @param NodeInterface $tree - * @param null|string $pseudoElement + * @param string|null $pseudoElement */ public function __construct(NodeInterface $tree, $pseudoElement = null) { @@ -45,7 +45,7 @@ class SelectorNode extends AbstractNode } /** - * @return null|string + * @return string|null */ public function getPseudoElement() { diff --git a/src/Symfony/Component/CssSelector/Parser/TokenStream.php b/src/Symfony/Component/CssSelector/Parser/TokenStream.php index 24e8634ad6..d2aee541cd 100644 --- a/src/Symfony/Component/CssSelector/Parser/TokenStream.php +++ b/src/Symfony/Component/CssSelector/Parser/TokenStream.php @@ -142,7 +142,7 @@ class TokenStream /** * Returns nex identifier or star delimiter token. * - * @return null|string The identifier token value or null if star found + * @return string|null The identifier token value or null if star found * * @throws SyntaxErrorException If next token is not an identifier or a star delimiter */ diff --git a/src/Symfony/Component/Debug/ErrorHandler.php b/src/Symfony/Component/Debug/ErrorHandler.php index 5606fd422e..43d09ccd1c 100644 --- a/src/Symfony/Component/Debug/ErrorHandler.php +++ b/src/Symfony/Component/Debug/ErrorHandler.php @@ -115,7 +115,7 @@ class ErrorHandler /** * Registers the error handler. * - * @param self|null|int $handler The handler to register, or @deprecated (since version 2.6, to be removed in 3.0) bit field of thrown levels + * @param self|int|null $handler The handler to register, or @deprecated (since version 2.6, to be removed in 3.0) bit field of thrown levels * @param bool $replace Whether to replace or not any existing handler * * @return self The registered error handler diff --git a/src/Symfony/Component/DependencyInjection/Definition.php b/src/Symfony/Component/DependencyInjection/Definition.php index 0880646b34..d9c37ea504 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -142,8 +142,8 @@ class Definition /** * Sets the service that this service is decorating. * - * @param null|string $id The decorated service id, use null to remove decoration - * @param null|string $renamedId The new decorated service id + * @param string|null $id The decorated service id, use null to remove decoration + * @param string|null $renamedId The new decorated service id * @param int $priority The priority of decoration * * @return $this @@ -168,7 +168,7 @@ class Definition /** * Gets the service that this service is decorating. * - * @return null|array An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated + * @return array|null An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated */ public function getDecoratedService() { diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index afcfbe8cb8..59f1af9e2a 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -104,7 +104,7 @@ class Crawler extends \SplObjectStorage * HTTP 1.1 specification. * * @param string $content A string to parse as HTML/XML - * @param null|string $type The content type of the string + * @param string|null $type The content type of the string */ public function addContent($content, $type = null) { diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index 5df92e733d..df31620561 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -578,7 +578,7 @@ class Filesystem * * @param string $filename The file to be written to * @param string $content The data to write into the file - * @param null|int $mode The file mode (octal). If null, file permissions are not modified + * @param int|null $mode The file mode (octal). If null, file permissions are not modified * Deprecated since version 2.3.12, to be removed in 3.0. * * @throws IOException if the file cannot be written to diff --git a/src/Symfony/Component/Form/Button.php b/src/Symfony/Component/Form/Button.php index d783275313..b72e6ae9ee 100644 --- a/src/Symfony/Component/Form/Button.php +++ b/src/Symfony/Component/Form/Button.php @@ -368,7 +368,7 @@ class Button implements \IteratorAggregate, FormInterface /** * Submits data to the button. * - * @param null|string $submittedData The data + * @param string|null $submittedData The data * @param bool $clearMissing Not used * * @return $this diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php b/src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php index c66ce0f028..eae2abf411 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php @@ -32,7 +32,7 @@ interface ChoiceListFactoryInterface * argument. * * @param iterable $choices The choices - * @param null|callable $value The callable generating the choice + * @param callable|null $value The callable generating the choice * values * * @return ChoiceListInterface The choice list @@ -51,7 +51,7 @@ interface ChoiceListFactoryInterface * argument. * * @param array|\Traversable $choices The choices - * @param null|callable $value The callable generating the choice + * @param callable|null $value The callable generating the choice * values * * @return ChoiceListInterface The choice list @@ -69,7 +69,7 @@ interface ChoiceListFactoryInterface * argument. * * @param ChoiceLoaderInterface $loader The choice loader - * @param null|callable $value The callable generating the choice + * @param callable|null $value The callable generating the choice * values * * @return ChoiceListInterface The choice list @@ -103,14 +103,14 @@ interface ChoiceListFactoryInterface * attributes that should be added to the respective choice. * * @param ChoiceListInterface $list The choice list - * @param null|array|callable $preferredChoices The preferred choices - * @param null|callable $label The callable generating the + * @param array|callable|null $preferredChoices The preferred choices + * @param callable|null $label The callable generating the * choice labels - * @param null|callable $index The callable generating the + * @param callable|null $index The callable generating the * view indices - * @param null|callable $groupBy The callable generating the + * @param callable|null $groupBy The callable generating the * group names - * @param null|array|callable $attr The callable generating the + * @param array|callable|null $attr The callable generating the * HTML attributes * * @return ChoiceListView The choice list view diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php b/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php index ee749ca029..01e138411c 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php @@ -60,7 +60,7 @@ class PropertyAccessDecorator implements ChoiceListFactoryInterface * {@inheritdoc} * * @param iterable $choices The choices - * @param null|callable|string|PropertyPath $value The callable or path for + * @param callable|string|PropertyPath|null $value The callable or path for * generating the choice values * * @return ChoiceListInterface The choice list @@ -91,7 +91,7 @@ class PropertyAccessDecorator implements ChoiceListFactoryInterface * {@inheritdoc} * * @param array|\Traversable $choices The choices - * @param null|callable|string|PropertyPath $value The callable or path for + * @param callable|string|PropertyPath|null $value The callable or path for * generating the choice values * * @return ChoiceListInterface The choice list @@ -110,7 +110,7 @@ class PropertyAccessDecorator implements ChoiceListFactoryInterface * {@inheritdoc} * * @param ChoiceLoaderInterface $loader The choice loader - * @param null|callable|string|PropertyPath $value The callable or path for + * @param callable|string|PropertyPath|null $value The callable or path for * generating the choice values * * @return ChoiceListInterface The choice list @@ -141,11 +141,11 @@ class PropertyAccessDecorator implements ChoiceListFactoryInterface * {@inheritdoc} * * @param ChoiceListInterface $list The choice list - * @param null|array|callable|string|PropertyPath $preferredChoices The preferred choices - * @param null|callable|string|PropertyPath $label The callable or path generating the choice labels - * @param null|callable|string|PropertyPath $index The callable or path generating the view indices - * @param null|callable|string|PropertyPath $groupBy The callable or path generating the group names - * @param null|array|callable|string|PropertyPath $attr The callable or path generating the HTML attributes + * @param array|callable|string|PropertyPath|null $preferredChoices The preferred choices + * @param callable|string|PropertyPath|null $label The callable or path generating the choice labels + * @param callable|string|PropertyPath|null $index The callable or path generating the view indices + * @param callable|string|PropertyPath|null $groupBy The callable or path generating the group names + * @param array|callable|string|PropertyPath|null $attr The callable or path generating the HTML attributes * * @return ChoiceListView The choice list view */ diff --git a/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php b/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php index ee00284bc4..406fdd5305 100644 --- a/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php +++ b/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php @@ -34,7 +34,7 @@ class LazyChoiceList implements ChoiceListInterface * * If null, choices are simply cast to strings. * - * @var null|callable + * @var callable|null */ private $value; @@ -51,7 +51,7 @@ class LazyChoiceList implements ChoiceListInterface * argument. * * @param ChoiceLoaderInterface $loader The choice loader - * @param null|callable $value The callable generating the choice values + * @param callable|null $value The callable generating the choice values */ public function __construct(ChoiceLoaderInterface $loader, $value = null) { diff --git a/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php b/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php index 573cc2d6e3..63e5f65210 100644 --- a/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php +++ b/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php @@ -31,7 +31,7 @@ interface ChoiceLoaderInterface * The callable receives the choice as first and the array key as the second * argument. * - * @param null|callable $value The callable which generates the values + * @param callable|null $value The callable which generates the values * from choices * * @return ChoiceListInterface The loaded choice list @@ -50,7 +50,7 @@ interface ChoiceLoaderInterface * * @param string[] $values An array of choice values. Non-existing * values in this array are ignored - * @param null|callable $value The callable generating the choice values + * @param callable|null $value The callable generating the choice values * * @return array An array of choices */ @@ -68,7 +68,7 @@ interface ChoiceLoaderInterface * * @param array $choices An array of choices. Non-existing choices in * this array are ignored - * @param null|callable $value The callable generating the choice values + * @param callable|null $value The callable generating the choice values * * @return string[] An array of choice values */ diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php index 99f8d82485..a577608fa7 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php @@ -32,7 +32,7 @@ class CsrfExtension extends AbstractExtension /** * @param CsrfTokenManagerInterface $tokenManager The CSRF token manager * @param TranslatorInterface $translator The translator for translating error messages - * @param null|string $translationDomain The translation domain for translating + * @param string|null $translationDomain The translation domain for translating */ public function __construct($tokenManager, TranslatorInterface $translator = null, $translationDomain = null) { diff --git a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php index 6dc5599e84..70c4595268 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php +++ b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php @@ -51,7 +51,7 @@ class CsrfValidationListener implements EventSubscriberInterface * same session and with the same tokenId * @param string $errorMessage The message displayed in case of an error * @param TranslatorInterface $translator - * @param null|string $translationDomain + * @param string|null $translationDomain * @param ServerParams $serverParams */ public function __construct($fieldName, $tokenManager, $tokenId, $errorMessage, TranslatorInterface $translator = null, $translationDomain = null, ServerParams $serverParams = null) diff --git a/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php b/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php index 8ff1a061c9..d27160bb64 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php +++ b/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php @@ -47,7 +47,7 @@ class FormTypeCsrfExtension extends AbstractTypeExtension * @param bool $defaultEnabled * @param string $defaultFieldName * @param TranslatorInterface $translator - * @param null|string $translationDomain + * @param string|null $translationDomain * @param ServerParams $serverParams */ public function __construct($defaultTokenManager, $defaultEnabled = true, $defaultFieldName = '_token', TranslatorInterface $translator = null, $translationDomain = null, ServerParams $serverParams = null) diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php index 0147afcac2..04e60f6cd3 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php +++ b/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php @@ -27,7 +27,7 @@ class UploadValidatorExtension extends AbstractTypeExtension /** * @param TranslatorInterface $translator The translator for translating error messages - * @param null|string $translationDomain The translation domain for translating + * @param string|null $translationDomain The translation domain for translating */ public function __construct(TranslatorInterface $translator, $translationDomain = null) { diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php index 98cb0de6a5..590f7df2d8 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php @@ -51,7 +51,7 @@ class MappingRule * * @param string $propertyPath The property path to match against the rule * - * @return null|FormInterface The mapped form or null + * @return FormInterface|null The mapped form or null */ public function match($propertyPath) { diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php index b635646f68..9671082a65 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php @@ -144,7 +144,7 @@ class ViolationMapper implements ViolationMapperInterface * @param FormInterface $form The form to search * @param PropertyPathIteratorInterface $it The iterator at its current position * - * @return null|FormInterface The found match or null + * @return FormInterface|null The found match or null */ private function matchChild(FormInterface $form, PropertyPathIteratorInterface $it) { diff --git a/src/Symfony/Component/Form/FormConfigBuilderInterface.php b/src/Symfony/Component/Form/FormConfigBuilderInterface.php index 31e5a82210..f422840a82 100644 --- a/src/Symfony/Component/Form/FormConfigBuilderInterface.php +++ b/src/Symfony/Component/Form/FormConfigBuilderInterface.php @@ -146,7 +146,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface /** * Sets the property path that the form should be mapped to. * - * @param null|string|PropertyPathInterface $propertyPath The property path or null if the path should be set + * @param string|PropertyPathInterface|null $propertyPath The property path or null if the path should be set * automatically based on the form's name * * @return $this The configuration object diff --git a/src/Symfony/Component/Form/FormConfigInterface.php b/src/Symfony/Component/Form/FormConfigInterface.php index b7083544a4..ce9171f3d4 100644 --- a/src/Symfony/Component/Form/FormConfigInterface.php +++ b/src/Symfony/Component/Form/FormConfigInterface.php @@ -38,7 +38,7 @@ interface FormConfigInterface /** * Returns the property path that the form should be mapped to. * - * @return null|PropertyPathInterface The property path + * @return PropertyPathInterface|null The property path */ public function getPropertyPath(); @@ -167,7 +167,7 @@ interface FormConfigInterface /** * Returns the class of the form data or null if the data is scalar or an array. * - * @return null|string The data class or null + * @return string|null The data class or null */ public function getDataClass(); diff --git a/src/Symfony/Component/Form/FormTypeInterface.php b/src/Symfony/Component/Form/FormTypeInterface.php index 0ad9cae7b7..3c095ab2bb 100644 --- a/src/Symfony/Component/Form/FormTypeInterface.php +++ b/src/Symfony/Component/Form/FormTypeInterface.php @@ -90,7 +90,7 @@ interface FormTypeInterface * Symfony 2.8 and will be unsupported as of Symfony 3.0. Return the * fully-qualified class name of the parent type instead. * - * @return string|null|FormTypeInterface The name of the parent type if any, null otherwise + * @return string|FormTypeInterface|null The name of the parent type if any, null otherwise */ public function getParent(); diff --git a/src/Symfony/Component/Form/SubmitButton.php b/src/Symfony/Component/Form/SubmitButton.php index 2422e11cd8..a838542f97 100644 --- a/src/Symfony/Component/Form/SubmitButton.php +++ b/src/Symfony/Component/Form/SubmitButton.php @@ -34,7 +34,7 @@ class SubmitButton extends Button implements ClickableInterface /** * Submits data to the button. * - * @param null|string $submittedData The data + * @param string|null $submittedData The data * @param bool $clearMissing Not used * * @return $this diff --git a/src/Symfony/Component/Form/Util/ServerParams.php b/src/Symfony/Component/Form/Util/ServerParams.php index 3d5b76a7c2..57b54a9c6e 100644 --- a/src/Symfony/Component/Form/Util/ServerParams.php +++ b/src/Symfony/Component/Form/Util/ServerParams.php @@ -41,7 +41,7 @@ class ServerParams /** * Returns maximum post size in bytes. * - * @return null|int The maximum post size in bytes + * @return int|null The maximum post size in bytes */ public function getPostMaxSize() { diff --git a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php index c0fd95ea6b..f11515969a 100644 --- a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php +++ b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php @@ -40,7 +40,7 @@ class BinaryFileResponse extends Response * @param int $status The response status code * @param array $headers An array of response headers * @param bool $public Files are public by default - * @param null|string $contentDisposition The type of Content-Disposition to set automatically with the filename + * @param string|null $contentDisposition The type of Content-Disposition to set automatically with the filename * @param bool $autoEtag Whether the ETag header should be automatically set * @param bool $autoLastModified Whether the Last-Modified header should be automatically set */ @@ -60,7 +60,7 @@ class BinaryFileResponse extends Response * @param int $status The response status code * @param array $headers An array of response headers * @param bool $public Files are public by default - * @param null|string $contentDisposition The type of Content-Disposition to set automatically with the filename + * @param string|null $contentDisposition The type of Content-Disposition to set automatically with the filename * @param bool $autoEtag Whether the ETag header should be automatically set * @param bool $autoLastModified Whether the Last-Modified header should be automatically set * diff --git a/src/Symfony/Component/HttpFoundation/HeaderBag.php b/src/Symfony/Component/HttpFoundation/HeaderBag.php index 06c9e9a0c7..0ef7428254 100644 --- a/src/Symfony/Component/HttpFoundation/HeaderBag.php +++ b/src/Symfony/Component/HttpFoundation/HeaderBag.php @@ -197,7 +197,7 @@ class HeaderBag implements \IteratorAggregate, \Countable * @param string $key The parameter key * @param \DateTime $default The default value * - * @return null|\DateTime The parsed DateTime or the default value if the header does not exist + * @return \DateTime|null The parsed DateTime or the default value if the header does not exist * * @throws \RuntimeException When the HTTP header is not parseable */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 1756ae5648..aed690377d 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -71,7 +71,7 @@ class PdoSessionHandler implements \SessionHandlerInterface private $pdo; /** - * @var string|null|false DSN string or null for session.save_path or false when lazy connection disabled + * @var string|false|null DSN string or null for session.save_path or false when lazy connection disabled */ private $dsn = false; diff --git a/src/Symfony/Component/HttpKernel/Config/FileLocator.php b/src/Symfony/Component/HttpKernel/Config/FileLocator.php index fb1f913bdf..c047ba3dac 100644 --- a/src/Symfony/Component/HttpKernel/Config/FileLocator.php +++ b/src/Symfony/Component/HttpKernel/Config/FileLocator.php @@ -26,7 +26,7 @@ class FileLocator extends BaseFileLocator /** * @param KernelInterface $kernel A KernelInterface instance - * @param null|string $path The path the global resource directory + * @param string|null $path The path the global resource directory * @param array $paths An array of paths where to look for resources */ public function __construct(KernelInterface $kernel, $path = null, array $paths = array()) diff --git a/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php index 22b309cd6f..19970f9b72 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php @@ -235,7 +235,7 @@ class MongoDbProfilerStorage implements ProfilerStorageInterface /** * @param string $dsn * - * @return null|array Array($server, $database, $collection) + * @return array|null Array($server, $database, $collection) */ private function parseDsn($dsn) { diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profile.php b/src/Symfony/Component/HttpKernel/Profiler/Profile.php index 5ebaae4f8d..1f2796d537 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/Profile.php +++ b/src/Symfony/Component/HttpKernel/Profiler/Profile.php @@ -92,7 +92,7 @@ class Profile /** * Returns the parent token. * - * @return null|string The parent token + * @return string|null The parent token */ public function getParentToken() { diff --git a/src/Symfony/Component/Intl/Intl.php b/src/Symfony/Component/Intl/Intl.php index 7777b0bb57..b4af8fb359 100644 --- a/src/Symfony/Component/Intl/Intl.php +++ b/src/Symfony/Component/Intl/Intl.php @@ -187,7 +187,7 @@ final class Intl /** * Returns the version of the installed ICU library. * - * @return null|string The ICU version or NULL if it could not be determined + * @return string|null The ICU version or NULL if it could not be determined */ public static function getIcuVersion() { diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index b0a5916adf..a261ea5340 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -567,7 +567,7 @@ class Process /** * Returns the exit code returned by the process. * - * @return null|int The exit status code, null if the Process is not terminated + * @return int|null The exit status code, null if the Process is not terminated * * @throws RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled */ @@ -588,7 +588,7 @@ class Process * This method relies on the Unix exit code status standardization * and might not be relevant for other operating systems. * - * @return null|string A string representation for the exit status code, null if the Process is not terminated + * @return string|null A string representation for the exit status code, null if the Process is not terminated * * @see http://tldp.org/LDP/abs/html/exitcodes.html * @see http://en.wikipedia.org/wiki/Unix_signal @@ -1044,7 +1044,7 @@ class Process /** * Gets the Process input. * - * @return null|string The Process input + * @return string|null The Process input */ public function getInput() { diff --git a/src/Symfony/Component/Process/ProcessBuilder.php b/src/Symfony/Component/Process/ProcessBuilder.php index f246c871b8..1bac780d63 100644 --- a/src/Symfony/Component/Process/ProcessBuilder.php +++ b/src/Symfony/Component/Process/ProcessBuilder.php @@ -99,7 +99,7 @@ class ProcessBuilder /** * Sets the working directory. * - * @param null|string $cwd The working directory + * @param string|null $cwd The working directory * * @return $this */ @@ -131,7 +131,7 @@ class ProcessBuilder * defined environment variable. * * @param string $name The variable name - * @param null|string $value The variable value + * @param string|null $value The variable value * * @return $this */ diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 8afff96727..485d88c8c5 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -1224,9 +1224,9 @@ class ProcessTest extends TestCase /** * @param string $commandline - * @param null|string $cwd - * @param null|array $env - * @param null|string $input + * @param string|null $cwd + * @param array|null $env + * @param string|null $input * @param int $timeout * @param array $options * diff --git a/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php b/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php index 12e6f5e524..e17c53c0d2 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php +++ b/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php @@ -24,7 +24,7 @@ class PropertyPathBuilder /** * Creates a new property path builder. * - * @param null|PropertyPathInterface|string $path The path to initially store + * @param PropertyPathInterface|string|null $path The path to initially store * in the builder. Optional. */ public function __construct($path = null) diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index 721cdf6e7c..50400f8733 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -29,7 +29,7 @@ class Route implements \Serializable private $condition = ''; /** - * @var null|CompiledRoute + * @var CompiledRoute|null */ private $compiled; diff --git a/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php b/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php index 861f228e15..450387a057 100644 --- a/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php +++ b/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php @@ -31,7 +31,7 @@ class CsrfTokenManager implements CsrfTokenManagerInterface private $namespace; /** - * @param null|string|RequestStack|callable $namespace + * @param string|RequestStack|callable|null $namespace * * null: generates a namespace using $_SERVER['HTTPS'] * * string: uses the given string * * RequestStack: generates a namespace using the current master request diff --git a/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php b/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php index 194e2e1908..f2c7f7c212 100644 --- a/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php +++ b/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php @@ -73,7 +73,7 @@ class GuardAuthenticatorHandler * @param GuardAuthenticatorInterface $guardAuthenticator * @param string $providerKey The provider (i.e. firewall) key * - * @return null|Response + * @return Response|null */ public function handleAuthenticationSuccess(TokenInterface $token, Request $request, GuardAuthenticatorInterface $guardAuthenticator, $providerKey) { @@ -118,7 +118,7 @@ class GuardAuthenticatorHandler * @param GuardAuthenticatorInterface $guardAuthenticator * @param string $providerKey The key of the firewall * - * @return null|Response + * @return Response|null */ public function handleAuthenticationFailure(AuthenticationException $authenticationException, Request $request, GuardAuthenticatorInterface $guardAuthenticator, $providerKey) { diff --git a/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php b/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php index 9241d40357..dbbb2410a6 100644 --- a/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php +++ b/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php @@ -22,7 +22,7 @@ class CamelCaseToSnakeCaseNameConverter implements NameConverterInterface private $lowerCamelCase; /** - * @param null|array $attributes The list of attributes to rename or null for all attributes + * @param array|null $attributes The list of attributes to rename or null for all attributes * @param bool $lowerCamelCase Use lowerCamelCase style */ public function __construct(array $attributes = null, $lowerCamelCase = true) diff --git a/src/Symfony/Component/Stopwatch/Section.php b/src/Symfony/Component/Stopwatch/Section.php index fe658a57e6..2cddddb94d 100644 --- a/src/Symfony/Component/Stopwatch/Section.php +++ b/src/Symfony/Component/Stopwatch/Section.php @@ -24,7 +24,7 @@ class Section private $events = array(); /** - * @var null|float + * @var float|null */ private $origin; diff --git a/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php b/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php index 0a94476ab7..1acb7f76af 100644 --- a/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php +++ b/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php @@ -29,7 +29,7 @@ abstract class AbstractOperation implements OperationInterface protected $result; /** - * @var null|array The domains affected by this operation + * @var array|null The domains affected by this operation */ private $domains; diff --git a/src/Symfony/Component/Validator/ExecutionContext.php b/src/Symfony/Component/Validator/ExecutionContext.php index 1eb322d997..8d93e69eec 100644 --- a/src/Symfony/Component/Validator/ExecutionContext.php +++ b/src/Symfony/Component/Validator/ExecutionContext.php @@ -41,7 +41,7 @@ class ExecutionContext implements ExecutionContextInterface * * @param GlobalExecutionContextInterface $globalContext The global context storing node-independent state * @param TranslatorInterface $translator The translator for translating violation messages - * @param null|string $translationDomain The domain of the validation messages + * @param string|null $translationDomain The domain of the validation messages * @param MetadataInterface $metadata The metadata of the validated node * @param mixed $value The value of the validated node * @param string $group The current validation group @@ -255,7 +255,7 @@ class ExecutionContext implements ExecutionContextInterface /** * Returns an array of group names. * - * @param null|string|string[] $groups The groups to resolve. If a single string is + * @param string|string[]|null $groups The groups to resolve. If a single string is * passed, it is converted to an array. If null * is passed, an array containing the current * group of the context is returned. diff --git a/src/Symfony/Component/Validator/ExecutionContextInterface.php b/src/Symfony/Component/Validator/ExecutionContextInterface.php index 08979cb964..4d5d2f6f65 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -134,7 +134,7 @@ interface ExecutionContextInterface * * @param mixed $value The value to validate * @param string $subPath The path to append to the context's property path - * @param null|string|string[] $groups The groups to validate in. If you don't pass any + * @param string|string[]|null $groups The groups to validate in. If you don't pass any * groups here, the current group of the context * will be used. * @param bool $traverse Whether to traverse the value if it is an array @@ -166,7 +166,7 @@ interface ExecutionContextInterface * @param mixed $value The value to validate * @param Constraint|Constraint[] $constraints The constraint(s) to validate against * @param string $subPath The path to append to the context's property path - * @param null|string|string[] $groups The groups to validate in. If you don't pass any + * @param string|string[]|null $groups The groups to validate in. If you don't pass any * groups here, the current group of the context * will be used. * diff --git a/src/Symfony/Component/Validator/Validator.php b/src/Symfony/Component/Validator/Validator.php index c151d92e3a..1aa5fd18d6 100644 --- a/src/Symfony/Component/Validator/Validator.php +++ b/src/Symfony/Component/Validator/Validator.php @@ -197,7 +197,7 @@ class Validator implements ValidatorInterface, Mapping\Factory\MetadataFactoryIn } /** - * @param null|string|string[] $groups + * @param string|string[]|null $groups * * @return string[] */ diff --git a/src/Symfony/Component/Validator/ValidatorBuilder.php b/src/Symfony/Component/Validator/ValidatorBuilder.php index 98ecddc7ae..c99de8cc79 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -70,7 +70,7 @@ class ValidatorBuilder implements ValidatorBuilderInterface private $translator; /** - * @var null|string + * @var string|null */ private $translationDomain;