Skip to content

Commit 8fdef5a

Browse files
committed
minor symfony#54626 [Serializer] add missing return type-hints (xabbuh)
This PR was merged into the 7.0 branch. Discussion ---------- [Serializer] add missing return type-hints | Q | A | ------------- | --- | Branch? | 7.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 47695d2 add missing return type-hints
2 parents f11766d + 47695d2 commit 8fdef5a

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)