Skip to content

Commit 3fbfc9c

Browse files
committed
Merge branch '7.0' into 7.1
* 7.0: add missing return type-hints Fix test
2 parents 9fd64b8 + 8fdef5a commit 3fbfc9c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassMagicGet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __get(string $property)
4040
}
4141
}
4242

43-
public function __isset(string $property)
43+
public function __isset(string $property): bool
4444
{
4545
return \in_array($property, ['magicProperty', 'constantMagicProperty'], true);
4646
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ protected function getGroups(array $context): array
266266
/**
267267
* Is this attribute allowed?
268268
*/
269-
protected function isAllowedAttribute(object|string $classOrObject, string $attribute, ?string $format = null, array $context = [])
269+
protected function isAllowedAttribute(object|string $classOrObject, string $attribute, ?string $format = null, array $context = []): bool
270270
{
271271
$ignoredAttributes = $context[self::IGNORED_ATTRIBUTES] ?? $this->defaultContext[self::IGNORED_ATTRIBUTES];
272272
if (\in_array($attribute, $ignoredAttributes, true)) {

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;

src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ public function __get($name)
11271127
}
11281128
}
11291129

1130-
public function __isset($name)
1130+
public function __isset($name): bool
11311131
{
11321132
return 'foo' === $name;
11331133
}

0 commit comments

Comments
 (0)