mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-02 14:34:31 +02:00
Use typed properties
This commit is contained in:
parent
548ec2ea50
commit
51e05a8669
216 changed files with 603 additions and 698 deletions
|
@ -64,10 +64,10 @@ class CleanAttachmentsCommand extends Command
|
|||
{
|
||||
protected static $defaultName = 'partdb:attachments:clean-unused|app:clean-attachments';
|
||||
|
||||
protected $attachment_helper;
|
||||
protected $reverseSearch;
|
||||
protected $mimeTypeGuesser;
|
||||
protected $pathResolver;
|
||||
protected AttachmentManager $attachment_helper;
|
||||
protected AttachmentReverseSearch $reverseSearch;
|
||||
protected MimeTypes $mimeTypeGuesser;
|
||||
protected AttachmentPathResolver $pathResolver;
|
||||
|
||||
public function __construct(AttachmentManager $attachmentHelper, AttachmentReverseSearch $reverseSearch, AttachmentPathResolver $pathResolver)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@ class CheckRequirementsCommand extends Command
|
|||
{
|
||||
protected static $defaultName = 'partdb:check-requirements';
|
||||
|
||||
protected $params;
|
||||
protected ContainerBagInterface $params;
|
||||
|
||||
public function __construct(ContainerBagInterface $params)
|
||||
{
|
||||
|
|
|
@ -59,9 +59,9 @@ class UpdateExchangeRatesCommand extends Command
|
|||
{
|
||||
protected static $defaultName = 'partdb:currencies:update-exchange-rates|partdb:update-exchange-rates|app:update-exchange-rates';
|
||||
|
||||
protected $base_current;
|
||||
protected $em;
|
||||
protected $exchangeRateUpdater;
|
||||
protected string $base_current;
|
||||
protected EntityManagerInterface $em;
|
||||
protected ExchangeRateUpdater $exchangeRateUpdater;
|
||||
|
||||
public function __construct(string $base_current, EntityManagerInterface $entityManager, ExchangeRateUpdater $exchangeRateUpdater)
|
||||
{
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace App\Command\Logs;
|
|||
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Entity\LogSystem\AbstractLogEntry;
|
||||
use App\Repository\LogEntryRepository;
|
||||
use App\Services\ElementTypeNameGenerator;
|
||||
use App\Services\LogSystem\LogEntryExtraFormatter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
@ -58,11 +59,11 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||
class ShowEventLogCommand extends Command
|
||||
{
|
||||
protected static $defaultName = 'partdb:logs:show|app:show-logs';
|
||||
protected $entityManager;
|
||||
protected $translator;
|
||||
protected $elementTypeNameGenerator;
|
||||
protected $repo;
|
||||
protected $formatter;
|
||||
protected EntityManagerInterface $entityManager;
|
||||
protected TranslatorInterface $translator;
|
||||
protected ElementTypeNameGenerator $elementTypeNameGenerator;
|
||||
protected LogEntryRepository $repo;
|
||||
protected LogEntryExtraFormatter $formatter;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager,
|
||||
TranslatorInterface $translator, ElementTypeNameGenerator $elementTypeNameGenerator, LogEntryExtraFormatter $formatter)
|
||||
|
|
|
@ -80,9 +80,9 @@ class ConvertBBCodeCommand extends Command
|
|||
|
||||
protected static $defaultName = 'partdb:migrations:convert-bbcode|app:convert-bbcode';
|
||||
|
||||
protected $em;
|
||||
protected $propertyAccessor;
|
||||
protected $converter;
|
||||
protected EntityManagerInterface $em;
|
||||
protected PropertyAccessorInterface $propertyAccessor;
|
||||
protected BBCodeToMarkdownConverter $converter;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager, PropertyAccessorInterface $propertyAccessor)
|
||||
{
|
||||
|
|
|
@ -58,9 +58,9 @@ class SetPasswordCommand extends Command
|
|||
{
|
||||
protected static $defaultName = 'partdb:users:set-password|app:set-password|users:set-password';
|
||||
|
||||
protected $entityManager;
|
||||
protected $encoder;
|
||||
protected $eventDispatcher;
|
||||
protected EntityManagerInterface $entityManager;
|
||||
protected UserPasswordHasherInterface $encoder;
|
||||
protected EventDispatcherInterface $eventDispatcher;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager, UserPasswordHasherInterface $passwordEncoder, EventDispatcherInterface $eventDispatcher)
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ class UserListCommand extends Command
|
|||
{
|
||||
protected static $defaultName = 'partdb:users:list|users:list';
|
||||
|
||||
protected $entityManager;
|
||||
protected EntityManagerInterface $entityManager;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager)
|
||||
{
|
||||
|
|
|
@ -13,8 +13,8 @@ class VersionCommand extends Command
|
|||
{
|
||||
protected static $defaultName = 'partdb:version|app:version';
|
||||
|
||||
protected $versionManager;
|
||||
protected $gitVersionInfo;
|
||||
protected VersionManagerInterface $versionManager;
|
||||
protected GitVersionInfo $gitVersionInfo;
|
||||
|
||||
public function __construct(VersionManagerInterface $versionManager, GitVersionInfo $gitVersionInfo)
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ class VersionCommand extends Command
|
|||
|
||||
$io->success($message);
|
||||
|
||||
$io->info('PHP version: '. phpversion());
|
||||
$io->info('PHP version: '.PHP_VERSION);
|
||||
$io->info('Symfony version: ' . $this->getApplication()->getVersion());
|
||||
$io->info('OS: '. php_uname());
|
||||
$io->info('PHP extension: '. implode(', ', get_loaded_extensions()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue