10BC0 [PHPDoc] Fix some union type cases · symfony/symfony@c76b5ce · GitHub
[go: up one dir, main page]

Skip to content

Commit c76b5ce

Browse files
committed
[PHPDoc] Fix some union type cases
1 parent e357dbb commit c76b5ce

File tree

20 files changed

+29
-39
lines changed

20 files changed

+29
-39
lines changed

src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public function getAccessDecisionLog()
389389
/**
390390
* Returns the configuration of the current firewall context.
391391
*
392-
* @return array|Data
392+
* @return array|Data|null
393393
*/
394394
public function getFirewall()
395395
{

src/Symfony/Component/BrowserKit/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function getHeaders()
123123
* @param string $header The header name
124124
* @param bool $first Whether to return the first value or all header values
125125
*
126-
* @return string|array The first header value if $first is true, an array of values otherwise
126+
* @return string|array|null The first header value if $first is true, an array of values otherwise
127127
*/
128128
public function getHeader($header, $first = true)
129129
{

src/Symfony/Component/Console/Descriptor/Descriptor.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,36 +72,26 @@ protected function write($content, $decorated = false)
7272

7373
/**
7474
* Describes an InputArgument instance.
75-
*
76-
* @return string|mixed
7775
*/
7876
abstract protected function describeInputArgument(InputArgument $argument, array $options = []);
7977

8078
/**
8179
* Describes an InputOption instance.
82-
*
83-
* @return string|mixed
8480
*/
8581
abstract protected function describeInputOption(InputOption $option, array $options = []);
8682

8783
/**
8884
* Describes an InputDefinition instance.
89-
*
90-
* @return string|mixed
9185
*/
9286
abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []);
9387

9488
/**
9589
* Describes a Command instance.
96-
*
97-
* @return string|mixed
9890
*/
9991
abstract protected function describeCommand(Command $command, array $options = []);
10092

10193
/**
10294
* Describes an Application instance.
103-
*
104-
* @return string|mixed
10595
*/
10696
abstract protected function describeApplication(Application $application, array $options = []);
10797
}

src/Symfony/Component/Console/Descriptor/TextDescriptor.php

Lines changed: 1 addition & 1 deletion
9C9A
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ private function formatDefaultValue($default): string
298298
}
299299

300300
/**
301-
* @param (Command|string)[] $commands
301+
* @param array<Command|string> $commands
302302
*/
303303
private function getColumnWidth(array $commands): int
304304
{

src/Symfony/Component/Console/Helper/QuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static function disableStty()
9797
/**
9898
* Asks the question to the user.
9999
*
100-
* @return bool|mixed|string|null
100+
* @return mixed
101101
*
102102
* @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
103103
*/

src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function validate($form, Constraint $formConstraint)
202202
/**
203203
* Returns the validation groups of the given form.
204204
*
205-
* @return string|GroupSequence|(string|GroupSequence)[] The validation groups
205+
* @return string|GroupSequence|array<string|GroupSequence> The validation groups
206206
*/
207207
private function getValidationGroups(FormInterface $form)
208208
{
@@ -241,9 +241,9 @@ private function getValidationGroups(FormInterface $form)
241241
/**
242242
* Post-processes the validation groups option for a given form.
243243
*
244-
* @param string|GroupSequence|(string|GroupSequence)[]|callable $groups The validation groups
244+
* @param string|GroupSequence|array<string|GroupSequence>|callable $groups The validation groups
245245
*
246-
* @return GroupSequence|(string|GroupSequence)[] The validation groups
246+
* @return GroupSequence|array<string|GroupSequence> The validation groups
247247
*/
248248
private static function resolveValidationGroups($groups, FormInterface $form)
249249
{

src/Symfony/Component/HttpFoundation/HeaderBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public function hasCacheControlDirective($key)
255255
*
256256
* @param string $key The directive name
257257
*
258-
* @return mixed|null The directive value if defined, null otherwise
258+
* @return mixed The directive value if defined, null otherwise
259259
*/
260260
public function getCacheControlDirective($key)
261261
{

src/Symfony/Component/Mailer/EventListener/EnvelopeListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class EnvelopeListener implements EventSubscriberInterface
2828

2929
/**
3030
* @param Address|string $sender
31-
* @param (Address|string)[] $recipients
31+
* @param array<Address|string> $recipients
3232
*/
3333
public function __construct($sender = null, array $recipients = null)
3434
{

src/Symfony/Component/Messenger/Command/AbstractFailedMessagesCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function getReceiverName(): string
4545
}
4646

4747
/**
48-
* @return mixed|null
48+
* @return mixed
4949
*/
5050
protected function getMessageId(Envelope $envelope)
5151
{

src/Symfony/Component/Mime/Address.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public static function create($address): self
106106
}
107107

108108
/**
109-
* @param (Address|string)[] $addresses
109+
* @param array<Address|string> $addresses
110110
*
111111
* @return Address[]
112112
*/

0 commit comments

Comments
 (0)
0