forked from wallabag/wallabag
Migrate to constructor promoted properties
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user