Skip to content

Commit 47695d2

Browse files
committed
add missing return type-hints
1 parent f09249c commit 47695d2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ protected function getGroups(array $context): array
250250
/**
251251
* Is this attribute allowed?
252252
*/
253-
protected function isAllowedAttribute(object|string $classOrObject, string $attribute, ?string $format = null, array $context = [])
253+
protected function isAllowedAttribute(object|string $classOrObject, string $attribute, ?string $format = null, array $context = []): bool
254254
{
255255
$ignoredAttributes = $context[self::IGNORED_ATTRIBUTES] ?? $this->defaultContext[self::IGNORED_ATTRIBUTES];
256256
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
@@ -158,7 +158,7 @@ protected function setAttributeValue(object $object, string $attribute, mixed $v
158158
}
159159
}
160160

161-
protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = [])
161+
protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []): bool
162162
{
163163
if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) {
164164
return false;

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

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

174-
protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = [])
174+
protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []): bool
175175
{
176176
if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) {
177177
return false;

0 commit comments

Comments
 (0)