Skip to content

Commit 6a8e99b

Browse files
committed
add missing return type-hints
1 parent 975f634 commit 6a8e99b

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,8 @@ protected function getGroups(array $context): array
267267

268268
/**
269269
* Is this attribute allowed?
270-
*
271-
* @return bool
272270
*/
273-
protected function isAllowedAttribute(object|string $classOrObject, string $attribute, ?string $format = null, array $context = [])
271+
protected function isAllowedAttribute(object|string $classOrObject, string $attribute, ?string $format = null, array $context = []): bool
274272
{
275273
$ignoredAttributes = $context[self::IGNORED_ATTRIBUTES] ?? $this->defaultContext[self::IGNORED_ATTRIBUTES];
276274
if (\in_array($attribute, $ignoredAttributes)) {

src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ protected function setAttributeValue(object $object, string $attribute, mixed $v
179179
}
180180
}
181181

182-
protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = [])
182+
protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []): bool
183183
{
184184
if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) {
185185
return false;

src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ protected function getAllowedAttributes(string|object $classOrObject, array $con
186186
return $allowedAttributes;
187187
}
188188

189-
protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = [])
189+
protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []): bool
190190
{
191191
if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) {
192192
return false;

0 commit comments

Comments
 (0)