Fixed some inspection issues

This commit is contained in:
Jan Böhmer 2024-03-03 19:57:31 +01:00
parent 33475dca66
commit 42e604245c
85 changed files with 272 additions and 291 deletions

View file

@ -86,11 +86,7 @@ class UniqueObjectCollectionValidator extends ConstraintValidator
private function getNormalizer(UniqueObjectCollection $unique): callable
{
if (null === $unique->normalizer) {
return static fn ($value) => $value;
}
return $unique->normalizer;
return $unique->normalizer ?? static fn($value) => $value;
}
private function reduceElementKeys(array $fields, array $element, UniqueObjectCollection $constraint): array

View file

@ -38,7 +38,7 @@ use function strlen;
class ValidGoogleAuthCodeValidator extends ConstraintValidator
{
public function __construct(private GoogleAuthenticatorInterface $googleAuthenticator, private Security $security)
public function __construct(private readonly GoogleAuthenticatorInterface $googleAuthenticator, private readonly Security $security)
{
}