1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-21 18:11:10 +00:00

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

@ -17,8 +17,8 @@ class CleanDownloadedImagesCommand extends Command
protected static $defaultDescription = 'Cleans downloaded images which are no more associated to an entry';
public function __construct(
private EntryRepository $entryRepository,
private DownloadImages $downloadImages,
private readonly EntryRepository $entryRepository,
private readonly DownloadImages $downloadImages,
) {
parent::__construct();
}

View file

@ -23,9 +23,9 @@ class CleanDuplicatesCommand extends Command
protected int $duplicates = 0;
public function __construct(
private EntityManagerInterface $entityManager,
private EntryRepository $entryRepository,
private UserRepository $userRepository,
private readonly EntityManagerInterface $entityManager,
private readonly EntryRepository $entryRepository,
private readonly UserRepository $userRepository,
) {
parent::__construct();
}

View file

@ -18,10 +18,10 @@ class ExportCommand extends Command
protected static $defaultDescription = 'Export all entries for an user';
public function __construct(
private EntryRepository $entryRepository,
private UserRepository $userRepository,
private EntriesExport $entriesExport,
private string $projectDir,
private readonly EntryRepository $entryRepository,
private readonly UserRepository $userRepository,
private readonly EntriesExport $entriesExport,
private readonly string $projectDir,
) {
parent::__construct();
}

View file

@ -21,9 +21,9 @@ class GenerateUrlHashesCommand extends Command
protected OutputInterface $output;
public function __construct(
private EntityManagerInterface $entityManager,
private EntryRepository $entryRepository,
private UserRepository $userRepository,
private readonly EntityManagerInterface $entityManager,
private readonly EntryRepository $entryRepository,
private readonly UserRepository $userRepository,
) {
parent::__construct();
}

View file

@ -34,21 +34,21 @@ class ImportCommand extends Command
protected static $defaultDescription = 'Import entries from a JSON export';
public function __construct(
private EntityManagerInterface $entityManager,
private TokenStorageInterface $tokenStorage,
private UserRepository $userRepository,
private WallabagV2Import $wallabagV2Import,
private FirefoxImport $firefoxImport,
private ChromeImport $chromeImport,
private ReadabilityImport $readabilityImport,
private InstapaperImport $instapaperImport,
private PinboardImport $pinboardImport,
private DeliciousImport $deliciousImport,
private WallabagV1Import $wallabagV1Import,
private ElcuratorImport $elcuratorImport,
private ShaarliImport $shaarliImport,
private PocketHtmlImport $pocketHtmlImport,
private OmnivoreImport $omnivoreImport,
private readonly EntityManagerInterface $entityManager,
private readonly TokenStorageInterface $tokenStorage,
private readonly UserRepository $userRepository,
private readonly WallabagV2Import $wallabagV2Import,
private readonly FirefoxImport $firefoxImport,
private readonly ChromeImport $chromeImport,
private readonly ReadabilityImport $readabilityImport,
private readonly InstapaperImport $instapaperImport,
private readonly PinboardImport $pinboardImport,
private readonly DeliciousImport $deliciousImport,
private readonly WallabagV1Import $wallabagV1Import,
private readonly ElcuratorImport $elcuratorImport,
private readonly ShaarliImport $shaarliImport,
private readonly PocketHtmlImport $pocketHtmlImport,
private readonly OmnivoreImport $omnivoreImport,
) {
parent::__construct();
}

View file

@ -17,7 +17,7 @@ class RedisWorkerCommand extends Command
protected static $defaultDescription = 'Launch Redis worker';
public function __construct(
private ContainerInterface $container,
private readonly ContainerInterface $container,
) {
parent::__construct();
}

View file

@ -38,13 +38,13 @@ class InstallCommand extends Command
];
public function __construct(
private EntityManagerInterface $entityManager,
private EventDispatcherInterface $dispatcher,
private UserManagerInterface $userManager,
private TableMetadataStorageConfiguration $tableMetadataStorageConfiguration,
private string $databaseDriver,
private array $defaultSettings,
private array $defaultIgnoreOriginInstanceRules,
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $dispatcher,
private readonly UserManagerInterface $userManager,
private readonly TableMetadataStorageConfiguration $tableMetadataStorageConfiguration,
private readonly string $databaseDriver,
private readonly array $defaultSettings,
private readonly array $defaultIgnoreOriginInstanceRules,
) {
parent::__construct();
}

View file

@ -16,7 +16,7 @@ class ListUserCommand extends Command
protected static $defaultDescription = 'List all users';
public function __construct(
private UserRepository $userRepository,
private readonly UserRepository $userRepository,
) {
parent::__construct();
}

View file

@ -22,11 +22,11 @@ class ReloadEntryCommand extends Command
protected static $defaultDescription = 'Reload entries';
public function __construct(
private EntryRepository $entryRepository,
private UserRepository $userRepository,
private EntityManagerInterface $entityManager,
private ContentProxy $contentProxy,
private EventDispatcherInterface $dispatcher,
private readonly EntryRepository $entryRepository,
private readonly UserRepository $userRepository,
private readonly EntityManagerInterface $entityManager,
private readonly ContentProxy $contentProxy,
private readonly EventDispatcherInterface $dispatcher,
) {
parent::__construct();
}

View file

@ -19,7 +19,7 @@ class ShowUserCommand extends Command
protected SymfonyStyle $io;
public function __construct(
private UserRepository $userRepository,
private readonly UserRepository $userRepository,
) {
parent::__construct();
}

View file

@ -19,9 +19,9 @@ class TagAllCommand extends Command
protected static $defaultDescription = 'Tag all entries using the tagging rules.';
public function __construct(
private EntityManagerInterface $entityManager,
private RuleBasedTagger $ruleBasedTagger,
private UserRepository $userRepository,
private readonly EntityManagerInterface $entityManager,
private readonly RuleBasedTagger $ruleBasedTagger,
private readonly UserRepository $userRepository,
) {
parent::__construct();
}

View file

@ -16,9 +16,9 @@ class UpdatePicturesPathCommand extends Command
protected static $defaultDescription = 'Update the path of the pictures for each entry when you changed your wallabag instance URL.';
public function __construct(
private EntityManagerInterface $entityManager,
private EntryRepository $entryRepository,
private string $wallabagUrl,
private readonly EntityManagerInterface $entityManager,
private readonly EntryRepository $entryRepository,
private readonly string $wallabagUrl,
) {
parent::__construct();
}