Rector php82 changes

This commit is contained in:
2025-10-02 16:19:16 +02:00
parent f2922018ce
commit 4a08de09b8
18 changed files with 30 additions and 36 deletions

View File

@@ -52,7 +52,7 @@ class SetPasswordCommand extends Command
$user->setPassword(
$encoderFactory->getEncoder($user)->encodePassword($password, $user->getSalt())
);
$this->entityManager->flush($user);
$this->entityManager->flush();
}
public function configure(): void

View File

@@ -22,7 +22,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
*/
class LoadCountries extends Fixture implements OrderedFixtureInterface
{
private array $availableLanguages;
private readonly array $availableLanguages;
public function __construct(private readonly ParameterBagInterface $parameterBag)
{

View File

@@ -30,7 +30,7 @@ class LoadLanguages extends Fixture implements OrderedFixtureInterface
// This array contains regional code to not exclude
private array $regionalVersionToInclude = ['ro_MD'];
private array $availableLanguages;
private readonly array $availableLanguages;
public function __construct(private readonly ParameterBagInterface $parameterBag)
{

View File

@@ -54,11 +54,8 @@ class LoadUsers extends Fixture implements OrderedFixtureInterface
],
];
private UserPasswordHasherInterface $passwordHasher;
public function __construct(UserPasswordHasherInterface $passwordHasher)
public function __construct(private readonly UserPasswordHasherInterface $passwordHasher)
{
$this->passwordHasher = $passwordHasher;
}
public function getOrder(): int

View File

@@ -22,11 +22,8 @@ use Symfony\Bundle\SecurityBundle\Security;
class TrackCreateUpdateSubscriber implements EventSubscriber
{
private Security $security;
public function __construct(Security $security)
public function __construct(private readonly Security $security)
{
$this->security = $security;
}
public function getSubscribedEvents(): array

View File

@@ -68,7 +68,7 @@ class UserTest extends TestCase
);
}
public function testIsAbsent()
public function testIsAbsent(): void
{
$user = new User();

View File

@@ -57,7 +57,7 @@ final class UserNormalizerTest extends TestCase
return ['context' => $context['docgen:expects'] ?? null];
}
public function supportsNormalization($data, ?string $format = null): bool
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return true;
}