mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-08 05:08:25 +00:00
Rector php82 changes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -68,7 +68,7 @@ class UserTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testIsAbsent()
|
||||
public function testIsAbsent(): void
|
||||
{
|
||||
$user = new User();
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user