Skip to content

Commit c2801bc

Browse files
[Validator] Add missing return types to ExecutionContextInterface
1 parent 0946c50 commit c2801bc

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Context/ExecutionContextInterface.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ interface ExecutionContextInterface
6666
*
6767
* @param string|\Stringable $message The error message as a string or a stringable object
6868
* @param array $params The parameters substituted in the error message
69+
*
70+
* @return void
6971
*/
7072
public function addViolation(string $message, array $params = []);
7173

@@ -125,7 +127,7 @@ public function getObject(): ?object;
125127
* @internal Used by the validator engine. Should not be called by user
126128
* code.
127129
*/
128-
public function setNode(mixed $value, ?object $object, MetadataInterface $metadata = null, string $propertyPath);
130+
public function setNode(mixed $value, ?object $object, MetadataInterface $metadata = null, string $propertyPath): void;
129131

130132
/**
131133
* Sets the currently validated group.
@@ -135,15 +137,15 @@ public function setNode(mixed $value, ?object $object, MetadataInterface $metada
135137
* @internal Used by the validator engine. Should not be called by user
136138
* code.
137139
*/
138-
public function setGroup(?string $group);
140+
public function setGroup(?string $group): void;
139141

140142
/**
141143
* Sets the currently validated constraint.
142144
*
143145
* @internal Used by the validator engine. Should not be called by user
144146
* code.
145147
*/
146-
public function setConstraint(Constraint $constraint);
148+
public function setConstraint(Constraint $constraint): void;
147149

148150
/**
149151
* Marks an object as validated in a specific validation group.
@@ -155,7 +157,7 @@ public function setConstraint(Constraint $constraint);
155157
* @internal Used by the validator engine. Should not be called by user
156158
* code.
157159
*/
158-
public function markGroupAsValidated(string $cacheKey, string $groupHash);
160+
public function markGroupAsValidated(string $cacheKey, string $groupHash): void;
159161

160162
/**
161163
* Returns whether an object was validated in a specific validation group.
@@ -177,7 +179,7 @@ public function isGroupValidated(string $cacheKey, string $groupHash): bool;
177179
* @internal Used by the validator engine. Should not be called by user
178180
* code.
179181
*/
180-
public function markConstraintAsValidated(string $cacheKey, string $constraintHash);
182+
public function markConstraintAsValidated(string $cacheKey, string $constraintHash): void;
181183

182184
/**
183185
* Returns whether a constraint was validated for an object.
@@ -199,7 +201,7 @@ public function isConstraintValidated(string $cacheKey, string $constraintHash):
199201
*
200202
* @see ObjectInitializerInterface
201203
*/
202-
public function markObjectAsInitialized(string $cacheKey);
204+
public function markObjectAsInitialized(string $cacheKey): void;
203205

204206
/**
205207
* Returns whether an object was initialized.

0 commit comments

Comments
 (0)