Skip to content

Commit

Permalink
[CS] Enforces null type hint on last position in phpDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
carusogabriel committed Oct 2, 2018
1 parent 984cda4 commit 24fb241
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public function handleRequest($request = null)
/**
* Submits data to the button.
*
* @param null|string $submittedData The data
* @param string|null $submittedData The data
* @param bool $clearMissing Not used
*
* @return $this
Expand Down
16 changes: 8 additions & 8 deletions ChoiceList/Factory/ChoiceListFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -51,7 +51,7 @@ public function createListFromChoices($choices, $value = null);
* 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
Expand All @@ -69,7 +69,7 @@ public function createListFromFlippedChoices($choices, $value = null);
* 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
Expand Down Expand Up @@ -103,14 +103,14 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = nul
* 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
Expand Down
16 changes: 8 additions & 8 deletions ChoiceList/Factory/PropertyAccessDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function getDecoratedFactory()
* {@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
Expand Down Expand Up @@ -91,7 +91,7 @@ public function createListFromChoices($choices, $value = null)
* {@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
Expand All @@ -110,7 +110,7 @@ public function createListFromFlippedChoices($choices, $value = null, $triggerDe
* {@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
Expand Down Expand Up @@ -141,11 +141,11 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = nul
* {@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
*/
Expand Down
4 changes: 2 additions & 2 deletions ChoiceList/LazyChoiceList.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LazyChoiceList implements ChoiceListInterface
*
* If null, choices are simply cast to strings.
*
* @var null|callable
* @var callable|null
*/
private $value;

Expand All @@ -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)
{
Expand Down
6 changes: 3 additions & 3 deletions ChoiceList/Loader/ChoiceLoaderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -50,7 +50,7 @@ public function loadChoiceList($value = null);
*
* @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
*/
Expand All @@ -68,7 +68,7 @@ public function loadChoicesForValues(array $values, $value = null);
*
* @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
*/
Expand Down
2 changes: 1 addition & 1 deletion Extension/Csrf/CsrfExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion Extension/Csrf/EventListener/CsrfValidationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static function getSubscribedEvents()
* 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)
Expand Down
2 changes: 1 addition & 1 deletion Extension/Csrf/Type/FormTypeCsrfExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Extension/Validator/Type/UploadValidatorExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion Extension/Validator/ViolationMapper/MappingRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function getOrigin()
*
* @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)
{
Expand Down
2 changes: 1 addition & 1 deletion Extension/Validator/ViolationMapper/ViolationMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function mapViolation(ConstraintViolation $violation, FormInterface $form
* @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)
{
Expand Down
2 changes: 1 addition & 1 deletion FormConfigBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function setRequired($required);
/**
* 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
Expand Down
4 changes: 2 additions & 2 deletions FormConfigInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getName();
/**
* 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();

Expand Down Expand Up @@ -167,7 +167,7 @@ public function getData();
/**
* 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();

Expand Down
2 changes: 1 addition & 1 deletion FormTypeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function setDefaultOptions(OptionsResolverInterface $resolver);
* 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();

Expand Down
2 changes: 1 addition & 1 deletion SubmitButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function isClicked()
/**
* Submits data to the button.
*
* @param null|string $submittedData The data
* @param string|null $submittedData The data
* @param bool $clearMissing Not used
*
* @return $this
Expand Down
2 changes: 1 addition & 1 deletion Util/ServerParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function hasPostMaxSizeBeenExceeded()
/**
* 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()
{
Expand Down

0 comments on commit 24fb241

Please sign in to comment.