Skip to content

Commit a52dc77

Browse files
minor #28675 [CS] Enforces null type hint on last position in phpDocs (carusogabriel)
This PR was merged into the 2.8 branch. Discussion ---------- [CS] Enforces null type hint on last position in phpDocs | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | no | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | - <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | - <!-- required for new features --> As a majority in our codebase, the `null` typehint usually comes in the last position in phpDocs. Commits ------- efbba25577 [CS] Enforces null type hint on last position in phpDocs
2 parents f00f21f + 6d1cddd commit a52dc77

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Command/Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ protected function configure()
140140
* execute() method, you set the code to execute by passing
141141
* a Closure to the setCode() method.
142142
*
143-
* @return null|int null or 0 if everything went fine, or an error code
143+
* @return int|null null or 0 if everything went fine, or an error code
144144
*
145145
* @throws LogicException When this abstract method is not implemented
146146
*

Helper/QuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function getName()
109109
*
110110
* This method is public for PHP 5.3 compatibility, it should be private.
111111
*
112-
* @return bool|mixed|null|string
112+
* @return bool|mixed|string|null
113113
*
114114
* @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
115115
*/

Question/Question.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function setHiddenFallback($fallback)
117117
/**
118118
* Gets values for the autocompleter.
119119
*
120-
* @return null|iterable
120+
* @return iterable|null
121121
*/
122122
public function getAutocompleterValues()
123123
{
@@ -127,7 +127,7 @@ public function getAutocompleterValues()
127127
/**
128128
* Sets values for the autocompleter.
129129
*
130-
* @param null|iterable $values
130+
* @param iterable|null $values
131131
*
132132
* @return $this
133133
*
@@ -156,7 +156,7 @@ public function setAutocompleterValues($values)
156156
/**
157157
* Sets a validator for the question.
158158
*
159-
* @param null|callable $validator
159+
* @param callable|null $validator
160160
*
161161
* @return $this
162162
*/
@@ -170,7 +170,7 @@ public function setValidator($validator)
170170
/**
171171
* Gets the validator for the question.
172172
*
173-
* @return null|callable
173+
* @return callable|null
174174
*/
175175
public function getValidator()
176176
{
@@ -182,7 +182,7 @@ public function getValidator()
182182
*
183183
* Null means an unlimited number of attempts.
184184
*
185-
* @param null|int $attempts
185+
* @param int|null $attempts
186186
*
187187
* @return $this
188188
*
@@ -204,7 +204,7 @@ public function setMaxAttempts($attempts)
204204
*
205205
* Null means an unlimited number of attempts.
206206
*
207-
* @return null|int
207+
* @return int|null
208208
*/
209209
public function getMaxAttempts()
210210
{

0 commit comments

Comments
 (0)