8000 [Validator] Backport type fixes · symfony/symfony@f9bb7ba · GitHub
[go: up one dir, main page]

Skip to content

Commit f9bb7ba

Browse files
committed
[Validator] Backport type fixes
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent 6cd50ad commit f9bb7ba

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/Symfony/Component/Validator/ConstraintViolation.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ class ConstraintViolation implements ConstraintViolationInterface
3333
* Creates a new constraint violation.
3434
*
3535
* @param string|\Stringable $message The violation message as a string or a stringable object
36-
* @param string $messageTemplate The raw violation message
36+
* @param string|null $messageTemplate The raw violation message
3737
* @param array $parameters The parameters to substitute in the
3838
* raw violation message
3939
* @param mixed $root The value originally passed to the
4040
* 10000 validator
41-
* @param string $propertyPath The property path from the root
41+
* @param string|null $propertyPath The property path from the root
4242
* value to the invalid value
4343
* @param mixed $invalidValue The invalid value that caused this
4444
* violation
4545
* @param int|null $plural The number for determining the plural
4646
* form when translating the message
47-
* @param mixed $code The error code of the violation
47+
* @param string|null $code The error code of the violation
4848
* @param Constraint|null $constraint The constraint whose validation
4949
* caused the violation
5050
* @param mixed $cause The cause of the violation

src/Symfony/Component/Validator/Context/ExecutionContext.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ExecutionContext implements ExecutionContextInterface
5656
private $translator;
5757

5858
/**
59-
* @var string
59+
* @var string|null
6060
*/
6161
private $translationDomain;
6262

@@ -112,21 +112,21 @@ class ExecutionContext implements ExecutionContextInterface
112112
/**
113113
* Stores which objects have been validated in which group.
114114
*
115-
* @var array
115+
* @var bool[][]
116116
*/
117117
private $validatedObjects = [];
118118

119119
/**
120120
* Stores which class constraint has been validated for which object.
121121
*
122-
* @var array
122+
* @var bool[]
123123
*/
124124
private $validatedConstraints = [];
125125

126126
/**
127127
* Stores which objects have been initialized.
128128
*
129-
* @var array
129+
* @var bool[]
130130
*/
131131
private $initializedObjects;
132132
private $cachedObjectsRefs;

src/Symfony/Component/Validator/Validator/LazyProperty.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ public function __construct(\Closure $propertyValueCallback)
2727

2828
public function getPropertyValue()
2929
{
30-
return \call_user_func($this->propertyValueCallback);
30+
return ($this->propertyValueCallback)();
3131
}
3232
}

0 commit comments

Comments
 (0)
0