Migrate to constructor promoted properties

This commit is contained in:
Yassine Guedidi
2025-04-05 13:54:27 +02:00
parent 4168727f36
commit 1d5674a230
85 changed files with 441 additions and 854 deletions

View File

@ -12,17 +12,12 @@ use Wallabag\Helper\DownloadImages;
class DownloadImagesSubscriber implements EventSubscriberInterface
{
private $em;
private $downloadImages;
private $enabled;
private $logger;
public function __construct(EntityManagerInterface $em, DownloadImages $downloadImages, $enabled, LoggerInterface $logger)
{
$this->em = $em;
$this->downloadImages = $downloadImages;
$this->enabled = $enabled;
$this->logger = $logger;
public function __construct(
private EntityManagerInterface $em,
private DownloadImages $downloadImages,
private $enabled,
private LoggerInterface $logger,
) {
}
public static function getSubscribedEvents(): array

View File

@ -9,13 +9,10 @@ use Wallabag\Event\ConfigUpdatedEvent;
class GenerateCustomCSSSubscriber implements EventSubscriberInterface
{
private $em;
private $compiler;
public function __construct(EntityManagerInterface $em, Compiler $compiler)
{
$this->em = $em;
$this->compiler = $compiler;
public function __construct(
private EntityManagerInterface $em,
private Compiler $compiler,
) {
}
public static function getSubscribedEvents(): array

View File

@ -17,11 +17,9 @@ use Wallabag\Entity\Entry;
*/
class SQLiteCascadeDeleteSubscriber implements EventSubscriber
{
private $doctrine;
public function __construct(ManagerRegistry $doctrine)
{
$this->doctrine = $doctrine;
public function __construct(
private ManagerRegistry $doctrine,
) {
}
/**

View File

@ -8,11 +8,9 @@ use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs;
class SchemaAdapterSubscriber implements EventSubscriber
{
private string $databaseTablePrefix;
public function __construct(string $databaseTablePrefix)
{
$this->databaseTablePrefix = $databaseTablePrefix;
public function __construct(
private string $databaseTablePrefix,
) {
}
public function getSubscribedEvents(): array