mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-06 11:09:29 +00:00
Fixed some inspection issues
This commit is contained in:
parent
33475dca66
commit
42e604245c
85 changed files with 272 additions and 291 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue