Skip to content

Commit 9836533

Browse files
committed
minor #40728 [PHPDoc] Fix some union type cases (fancyweb)
This PR was merged into the 4.4 branch. Discussion ---------- [PHPDoc] Fix some union type cases | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - While working on symfony/symfony#40154, I discovered some PHPDoc issues, I'm going to comment in the review. Upper branches will need some fixes too. Commits ------- dd1481642b [PHPDoc] Fix some union type cases
2 parents 9d0c6fe + 2892b1c commit 9836533

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

Validator/ContextualValidatorInterface.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ public function atPath($path);
4040
* If no constraint is passed, the constraint
4141
* {@link \Symfony\Component\Validator\Constraints\Valid} is assumed.
4242
*
43-
* @param mixed $value The value to validate
44-
* @param Constraint|Constraint[] $constraints The constraint(s) to validate against
45-
* @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed
43+
* @param mixed $value The value to validate
44+
* @param Constraint|Constraint[] $constraints The constraint(s) to validate against
45+
* @param string|GroupSequence|array<string|GroupSequence>|null $groups The validation groups to validate. If none is given, "Default" is assumed
4646
*
4747
* @return $this
4848
*/
@@ -52,9 +52,9 @@ public function validate($value, $constraints = null, $groups = null);
5252
* Validates a property of an object against the constraints specified
5353
* for this property.
5454
*
55-
* @param object $object The object
56-
* @param string $propertyName The name of the validated property
57-
* @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed
55+
* @param object $object The object
56+
* @param string $propertyName The name of the validated property
57+
* @param string|GroupSequence|array<string|GroupSequence>|null $groups The validation groups to validate. If none is given, "Default" is assumed
5858
*
5959
* @return $this
6060
*/
@@ -64,10 +64,10 @@ public function validateProperty($object, $propertyName, $groups = null);
6464
* Validates a value against the constraints specified for an object's
6565
* property.
6666
*
67-
* @param object|string $objectOrClass The object or its class name
68-
* @param string $propertyName The name of the property
69-
* @param mixed $value The value to validate against the property's constraints
70-
* @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed
67+
* @param object|string $objectOrClass The object or its class name
68+
* @param string $propertyName The name of the property
69+
* @param mixed $value The value to validate against the property's constraints
70+
* @param string|GroupSequence|array<string|GroupSequence>|null $groups The validation groups to validate. If none is given, "Default" is assumed
7171
*
7272
* @return $this
7373
*/

Validator/RecursiveContextualValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,9 @@ public function getViolations()
271271
/**
272272
* Normalizes the given group or list of groups to an array.
273273
*
274-
* @param string|GroupSequence|(string|GroupSequence)[] $groups The groups to normalize
274+
* @param string|GroupSequence|array<string|GroupSequence> $groups The groups to normalize
275275
*
276-
* @return (string|GroupSequence)[] A group array
276+
* @return array<string|GroupSequence> A group array
277277
*/
278278
protected function normalizeGroups($groups)
279279
{

Validator/ValidatorInterface.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ interface ValidatorInterface extends MetadataFactoryInterface
3030
* If no constraint is passed, the constraint
3131
* {@link \Symfony\Component\Validator\Constraints\Valid} is assumed.
3232
*
33-
* @param mixed $value The value to validate
34-
* @param Constraint|Constraint[] $constraints The constraint(s) to validate against
35-
* @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed
33+
* @param mixed $value The value to validate
34+
* @param Constraint|Constraint[] $constraints The constraint(s) to validate against
35+
* @param string|GroupSequence|array<string|GroupSequence>|null $groups The validation groups to validate. If none is given, "Default" is assumed
3636
*
3737
* @return ConstraintViolationListInterface A list of constraint violations
3838
* If the list is empty, validation
@@ -44,9 +44,9 @@ public function validate($value, $constraints = null, $groups = null);
4444
* Validates a property of an object against the constraints specified
4545
* for this property.
4646
*
47-
* @param object $object The object
48-
* @param string $propertyName The name of the validated property
49-
* @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed
47+
* @param object $object The object
48+
* @param string $propertyName The name of the validated property
49+
* @param string|GroupSequence|array<string|GroupSequence>|null $groups The validation groups to validate. If none is given, "Default" is assumed
5050
*
5151
* @return ConstraintViolationListInterface A list of constraint violations
5252
* If the list is empty, validation
@@ -58,10 +58,10 @@ public function validateProperty($object, $propertyName, $groups = null);
5858
* Validates a value against the constraints specified for an object's
5959
* property.
6060
*
61-
* @param object|string $objectOrClass The object or its class name
62-
* @param string $propertyName The name of the property
63-
* @param mixed $value The value to validate against the property's constraints
64-
* @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed
61+
* @param object|string $objectOrClass The object or its class name
62+
* @param string $propertyName The name of the property
63+
* @param mixed $value The value to validate against the property's constraints
64+
* @param string|GroupSequence|array<string|GroupSequence>|null $groups The validation groups to validate. If none is given, "Default" is assumed
6565
*
6666
* @return ConstraintViolationListInterface A list of constraint violations
6767
* If the list is empty, validation

0 commit comments

Comments
 (0)