Migrate to readonly properties

This commit is contained in:
Yassine Guedidi
2025-04-05 13:59:36 +02:00
parent a107773c11
commit ca018c77e3
71 changed files with 203 additions and 199 deletions

View File

@ -10,8 +10,8 @@ use Symfony\Component\Security\Http\Event\LoginFailureEvent;
class AuthenticationFailureListener implements EventSubscriberInterface
{
public function __construct(
private RequestStack $requestStack,
private LoggerInterface $logger,
private readonly RequestStack $requestStack,
private readonly LoggerInterface $logger,
) {
}

View File

@ -16,7 +16,7 @@ use Wallabag\Entity\Config;
class CreateConfigListener implements EventSubscriberInterface
{
public function __construct(
private EntityManagerInterface $em,
private readonly EntityManagerInterface $em,
private $itemsOnPage,
private $feedLimit,
private $language,
@ -24,7 +24,7 @@ class CreateConfigListener implements EventSubscriberInterface
private $actionMarkAsRead,
private $listMode,
private $displayThumbnails,
private RequestStack $requestStack,
private readonly RequestStack $requestStack,
) {
}

View File

@ -16,7 +16,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
class PasswordResettingListener implements EventSubscriberInterface
{
public function __construct(
private UrlGeneratorInterface $router,
private readonly UrlGeneratorInterface $router,
) {
}

View File

@ -15,7 +15,7 @@ class RegistrationListener implements EventSubscriberInterface
*/
public function __construct(
private $registrationEnabled,
private UrlGeneratorInterface $urlGenerator,
private readonly UrlGeneratorInterface $urlGenerator,
) {
}

View File

@ -17,7 +17,7 @@ use Wallabag\Entity\User;
class UserLocaleListener
{
public function __construct(
private SessionInterface $session,
private readonly SessionInterface $session,
) {
}

View File

@ -13,10 +13,10 @@ use Wallabag\Helper\DownloadImages;
class DownloadImagesSubscriber implements EventSubscriberInterface
{
public function __construct(
private EntityManagerInterface $em,
private DownloadImages $downloadImages,
private readonly EntityManagerInterface $em,
private readonly DownloadImages $downloadImages,
private $enabled,
private LoggerInterface $logger,
private readonly LoggerInterface $logger,
) {
}

View File

@ -10,8 +10,8 @@ use Wallabag\Event\ConfigUpdatedEvent;
class GenerateCustomCSSSubscriber implements EventSubscriberInterface
{
public function __construct(
private EntityManagerInterface $em,
private Compiler $compiler,
private readonly EntityManagerInterface $em,
private readonly Compiler $compiler,
) {
}

View File

@ -18,7 +18,7 @@ use Wallabag\Entity\Entry;
class SQLiteCascadeDeleteSubscriber implements EventSubscriber
{
public function __construct(
private ManagerRegistry $doctrine,
private readonly ManagerRegistry $doctrine,
) {
}

View File

@ -9,7 +9,7 @@ use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs;
class SchemaAdapterSubscriber implements EventSubscriber
{
public function __construct(
private string $databaseTablePrefix,
private readonly string $databaseTablePrefix,
) {
}