Skip to content

Commit

Permalink
Merge branch '7.0' into 7.1
Browse files Browse the repository at this point in the history
* 7.0:
  add missing return type-hints
  Fix test
  • Loading branch information
xabbuh committed Apr 16, 2024
2 parents 9fd64b8 + 8fdef5a commit 3fbfc9c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __get(string $property)
}
}

public function __isset(string $property)
public function __isset(string $property): bool
{
return \in_array($property, ['magicProperty', 'constantMagicProperty'], true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ protected function getGroups(array $context): array
/**
* Is this attribute allowed?
*/
protected function isAllowedAttribute(object|string $classOrObject, string $attribute, ?string $format = null, array $context = [])
protected function isAllowedAttribute(object|string $classOrObject, string $attribute, ?string $format = null, array $context = []): bool
{
$ignoredAttributes = $context[self::IGNORED_ATTRIBUTES] ?? $this->defaultContext[self::IGNORED_ATTRIBUTES];
if (\in_array($attribute, $ignoredAttributes, true)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ protected function setAttributeValue(object $object, string $attribute, mixed $v
}
}

protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = [])
protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []): bool
{
if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ protected function getAllowedAttributes(string|object $classOrObject, array $con
return $allowedAttributes;
}

protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = [])
protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []): bool
{
if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ public function __get($name)
}
}

public function __isset($name)
public function __isset($name): bool
{
return 'foo' === $name;
}
Expand Down

0 comments on commit 3fbfc9c

Please sign in to comment.