Skip to content

Commit 24fb241

Browse files
committed
[CS] Enforces null type hint on last position in phpDocs
1 parent 984cda4 commit 24fb241

16 files changed

+34
-34
lines changed

Button.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ public function handleRequest($request = null)
368368
/**
369369
* Submits data to the button.
370370
*
371-
* @param null|string $submittedData The data
371+
* @param string|null $submittedData The data
372372
* @param bool $clearMissing Not used
373373
*
374374
* @return $this

ChoiceList/Factory/ChoiceListFactoryInterface.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ interface ChoiceListFactoryInterface
3232
* argument.
3333
*
3434
* @param iterable $choices The choices
35-
* @param null|callable $value The callable generating the choice
35+
* @param callable|null $value The callable generating the choice
3636
* values
3737
*
3838
* @return ChoiceListInterface The choice list
@@ -51,7 +51,7 @@ public function createListFromChoices($choices, $value = null);
5151
* argument.
5252
*
5353
* @param array|\Traversable $choices The choices
54-
* @param null|callable $value The callable generating the choice
54+
* @param callable|null $value The callable generating the choice
5555
* values
5656
*
5757
* @return ChoiceListInterface The choice list
@@ -69,7 +69,7 @@ public function createListFromFlippedChoices($choices, $value = null);
6969
* argument.
7070
*
7171
* @param ChoiceLoaderInterface $loader The choice loader
72-
* @param null|callable $value The callable generating the choice
72+
* @param callable|null $value The callable generating the choice
7373
* values
7474
*
7575
* @return ChoiceListInterface The choice list
@@ -103,14 +103,14 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = nul
103103
* attributes that should be added to the respective choice.
104104
*
105105
* @param ChoiceListInterface $list The choice list
106-
* @param null|array|callable $preferredChoices The preferred choices
107-
* @param null|callable $label The callable generating the
106+
* @param array|callable|null $preferredChoices The preferred choices
107+
* @param callable|null $label The callable generating the
108108
* choice labels
109-
* @param null|callable $index The callable generating the
109+
* @param callable|null $index The callable generating the
110110
* view indices
111-
* @param null|callable $groupBy The callable generating the
111+
* @param callable|null $groupBy The callable generating the
112112
* group names
113-
* @param null|array|callable $attr The callable generating the
113+
* @param array|callable|null $attr The callable generating the
114114
* HTML attributes
115115
*
116116
* @return ChoiceListView The choice list view

ChoiceList/Factory/PropertyAccessDecorator.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function getDecoratedFactory()
6060
* {@inheritdoc}
6161
*
6262
* @param iterable $choices The choices
63-
* @param null|callable|string|PropertyPath $value The callable or path for
63+
* @param callable|string|PropertyPath|null $value The callable or path for
6464
* generating the choice values
6565
*
6666
* @return ChoiceListInterface The choice list
@@ -91,7 +91,7 @@ public function createListFromChoices($choices, $value = null)
9191
* {@inheritdoc}
9292
*
9393
* @param array|\Traversable $choices The choices
94-
* @param null|callable|string|PropertyPath $value The callable or path for
94+
* @param callable|string|PropertyPath|null $value The callable or path for
9595
* generating the choice values
9696
*
9797
* @return ChoiceListInterface The choice list
@@ -110,7 +110,7 @@ public function createListFromFlippedChoices($choices, $value = null, $triggerDe
110110
* {@inheritdoc}
111111
*
112112
* @param ChoiceLoaderInterface $loader The choice loader
113-
* @param null|callable|string|PropertyPath $value The callable or path for
113+
* @param callable|string|PropertyPath|null $value The callable or path for
114114
* generating the choice values
115115
*
116116
* @return ChoiceListInterface The choice list
@@ -141,11 +141,11 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = nul
141141
* {@inheritdoc}
142142
*
143143
* @param ChoiceListInterface $list The choice list
144-
* @param null|array|callable|string|PropertyPath $preferredChoices The preferred choices
145-
* @param null|callable|string|PropertyPath $label The callable or path generating the choice labels
146-
* @param null|callable|string|PropertyPath $index The callable or path generating the view indices
147-
* @param null|callable|string|PropertyPath $groupBy The callable or path generating the group names
148-
* @param null|array|callable|string|PropertyPath $attr The callable or path generating the HTML attributes
144+
* @param array|callable|string|PropertyPath|null $preferredChoices The preferred choices
145+
* @param callable|string|PropertyPath|null $label The callable or path generating the choice labels
146+
* @param callable|string|PropertyPath|null $index The callable or path generating the view indices
147+
* @param callable|string|PropertyPath|null $groupBy The callable or path generating the group names
148+
* @param array|callable|string|PropertyPath|null $attr The callable or path generating the HTML attributes
149149
*
150150
* @return ChoiceListView The choice list view
151151
*/

ChoiceList/LazyChoiceList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class LazyChoiceList implements ChoiceListInterface
3434
*
3535
* If null, choices are simply cast to strings.
3636
*
37-
* @var null|callable
37+
* @var callable|null
3838
*/
3939
private $value;
4040

@@ -51,7 +51,7 @@ class LazyChoiceList implements ChoiceListInterface
5151
* argument.
5252
*
5353
* @param ChoiceLoaderInterface $loader The choice loader
54-
* @param null|callable $value The callable generating the choice values
54+
* @param callable|null $value The callable generating the choice values
5555
*/
5656
public function __construct(ChoiceLoaderInterface $loader, $value = null)
5757
{

ChoiceList/Loader/ChoiceLoaderInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ interface ChoiceLoaderInterface
3131
* The callable receives the choice as first and the array key as the second
3232
* argument.
3333
*
34-
* @param null|callable $value The callable which generates the values
34+
* @param callable|null $value The callable which generates the values
3535
* from choices
3636
*
3737
* @return ChoiceListInterface The loaded choice list
@@ -50,7 +50,7 @@ public function loadChoiceList($value = null);
5050
*
5151
* @param string[] $values An array of choice values. Non-existing
5252
* values in this array are ignored
53-
* @param null|callable $value The callable generating the choice values
53+
* @param callable|null $value The callable generating the choice values
5454
*
5555
* @return array An array of choices
5656
*/
@@ -68,7 +68,7 @@ public function loadChoicesForValues(array $values, $value = null);
6868
*
6969
* @param array $choices An array of choices. Non-existing choices in
7070
* this array are ignored
71-
* @param null|callable $value The callable generating the choice values
71+
* @param callable|null $value The callable generating the choice values
7272
*
7373
* @return string[] An array of choice values
7474
*/

Extension/Csrf/CsrfExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class CsrfExtension extends AbstractExtension
3232
/**
3333
* @param CsrfTokenManagerInterface $tokenManager The CSRF token manager
3434
* @param TranslatorInterface $translator The translator for translating error messages
35-
* @param null|string $translationDomain The translation domain for translating
35+
* @param string|null $translationDomain The translation domain for translating
3636
*/
3737
public function __construct($tokenManager, TranslatorInterface $translator = null, $translationDomain = null)
3838
{

Extension/Csrf/EventListener/CsrfValidationListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static function getSubscribedEvents()
5151
* same session and with the same tokenId
5252
* @param string $errorMessage The message displayed in case of an error
5353
* @param TranslatorInterface $translator
54-
* @param null|string $translationDomain
54+
* @param string|null $translationDomain
5555
* @param ServerParams $serverParams
5656
*/
5757
public function __construct($fieldName, $tokenManager, $tokenId, $errorMessage, TranslatorInterface $translator = null, $translationDomain = null, ServerParams $serverParams = null)

Extension/Csrf/Type/FormTypeCsrfExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class FormTypeCsrfExtension extends AbstractTypeExtension
4747
* @param bool $defaultEnabled
4848
* @param string $defaultFieldName
4949
* @param TranslatorInterface $translator
50-
* @param null|string $translationDomain
50+
* @param string|null $translationDomain
5151
* @param ServerParams $serverParams
5252
*/
5353
public function __construct($defaultTokenManager, $defaultEnabled = true, $defaultFieldName = '_token', TranslatorInterface $translator = null, $translationDomain = null, ServerParams $serverParams = null)

Extension/Validator/Type/UploadValidatorExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class UploadValidatorExtension extends AbstractTypeExtension
2727

2828
/**
2929
* @param TranslatorInterface $translator The translator for translating error messages
30-
* @param null|string $translationDomain The translation domain for translating
30+
* @param string|null $translationDomain The translation domain for translating
3131
*/
3232
public function __construct(TranslatorInterface $translator, $translationDomain = null)
3333
{

Extension/Validator/ViolationMapper/MappingRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function getOrigin()
5151
*
5252
* @param string $propertyPath The property path to match against the rule
5353
*
54-
* @return null|FormInterface The mapped form or null
54+
* @return FormInterface|null The mapped form or null
5555
*/
5656
public function match($propertyPath)
5757
{

Extension/Validator/ViolationMapper/ViolationMapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function mapViolation(ConstraintViolation $violation, FormInterface $form
144144
* @param FormInterface $form The form to search
145145
* @param PropertyPathIteratorInterface $it The iterator at its current position
146146
*
147-
* @return null|FormInterface The found match or null
147+
* @return FormInterface|null The found match or null
148148
*/
149149
private function matchChild(FormInterface $form, PropertyPathIteratorInterface $it)
150150
{

FormConfigBuilderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function setRequired($required);
146146
/**
147147
* Sets the property path that the form should be mapped to.
148148
*
149-
* @param null|string|PropertyPathInterface $propertyPath The property path or null if the path should be set
149+
* @param string|PropertyPathInterface|null $propertyPath The property path or null if the path should be set
150150
* automatically based on the form's name
151151
*
152152
* @return $this The configuration object

FormConfigInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function getName();
3838
/**
3939
* Returns the property path that the form should be mapped to.
4040
*
41-
* @return null|PropertyPathInterface The property path
41+
* @return PropertyPathInterface|null The property path
4242
*/
4343
public function getPropertyPath();
4444

@@ -167,7 +167,7 @@ public function getData();
167167
/**
168168
* Returns the class of the form data or null if the data is scalar or an array.
169169
*
170-
* @return null|string The data class or null
170+
* @return string|null The data class or null
171171
*/
172172
public function getDataClass();
173173

FormTypeInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function setDefaultOptions(OptionsResolverInterface $resolver);
9090
* Symfony 2.8 and will be unsupported as of Symfony 3.0. Return the
9191
* fully-qualified class name of the parent type instead.
9292
*
93-
* @return string|null|FormTypeInterface The name of the parent type if any, null otherwise
93+
* @return string|FormTypeInterface|null The name of the parent type if any, null otherwise
9494
*/
9595
public function getParent();
9696

SubmitButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function isClicked()
3434
/**
3535
* Submits data to the button.
3636
*
37-
* @param null|string $submittedData The data
37+
* @param string|null $submittedData The data
3838
* @param bool $clearMissing Not used
3939
*
4040
* @return $this

Util/ServerParams.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function hasPostMaxSizeBeenExceeded()
4141
/**
4242
* Returns maximum post size in bytes.
4343
*
44-
* @return null|int The maximum post size in bytes
44+
* @return int|null The maximum post size in bytes
4545
*/
4646
public function getPostMaxSize()
4747
{

0 commit comments

Comments
 (0)