[Admin][Twig][Component] Replace private with protected constructor parameters

This commit is contained in:
Wojdylak 2024-11-19 15:34:20 +01:00
parent cc4d72579f
commit f5b5aeb6cc
No known key found for this signature in database
GPG key ID: 7509E560A6821ABE
18 changed files with 29 additions and 29 deletions

View file

@ -38,8 +38,8 @@ class OrderStatisticsComponent
* @param CustomerRepositoryInterface<CustomerInterface> $customerRepository * @param CustomerRepositoryInterface<CustomerInterface> $customerRepository
*/ */
public function __construct( public function __construct(
private readonly CustomerRepositoryInterface $customerRepository, protected readonly CustomerRepositoryInterface $customerRepository,
private readonly CustomerStatisticsProviderInterface $statisticsProvider, protected readonly CustomerStatisticsProviderInterface $statisticsProvider,
) { ) {
} }

View file

@ -41,7 +41,7 @@ class ChannelSelectorComponent
/** /**
* @param ChannelRepositoryInterface<ChannelInterface> $channelRepository * @param ChannelRepositoryInterface<ChannelInterface> $channelRepository
*/ */
public function __construct(private readonly ChannelRepositoryInterface $channelRepository) public function __construct(protected readonly ChannelRepositoryInterface $channelRepository)
{ {
} }

View file

@ -27,7 +27,7 @@ class NewCustomersComponent
* @param CustomerRepositoryInterface<CustomerInterface> $customerRepository * @param CustomerRepositoryInterface<CustomerInterface> $customerRepository
*/ */
public function __construct( public function __construct(
private readonly CustomerRepositoryInterface $customerRepository, protected readonly CustomerRepositoryInterface $customerRepository,
) { ) {
} }

View file

@ -43,8 +43,8 @@ class NewOrdersComponent
* @param ChannelRepositoryInterface<ChannelInterface> $channelRepository * @param ChannelRepositoryInterface<ChannelInterface> $channelRepository
*/ */
public function __construct( public function __construct(
private readonly OrderRepositoryInterface $orderRepository, protected readonly OrderRepositoryInterface $orderRepository,
private readonly ChannelRepositoryInterface $channelRepository, protected readonly ChannelRepositoryInterface $channelRepository,
) { ) {
} }

View file

@ -55,8 +55,8 @@ class StatisticsComponent
* @param ChannelRepositoryInterface<ChannelInterface> $channelRepository * @param ChannelRepositoryInterface<ChannelInterface> $channelRepository
*/ */
public function __construct( public function __construct(
private readonly ChannelRepositoryInterface $channelRepository, protected readonly ChannelRepositoryInterface $channelRepository,
private readonly StatisticsProviderInterface $statisticsProvider, protected readonly StatisticsProviderInterface $statisticsProvider,
) { ) {
} }

View file

@ -27,7 +27,7 @@ class AddressHistoryComponent
/** @param RepositoryInterface<AddressLogEntry> $addressLogRepository */ /** @param RepositoryInterface<AddressLogEntry> $addressLogRepository */
public function __construct( public function __construct(
private readonly RepositoryInterface $addressLogRepository, protected readonly RepositoryInterface $addressLogRepository,
) { ) {
} }

View file

@ -19,7 +19,7 @@ use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
#[AsTwigComponent] #[AsTwigComponent]
class ProductTaxonsComponent class ProductTaxonsComponent
{ {
public function __construct(private readonly AllTaxonsInterface $allTaxons) public function __construct(protected readonly AllTaxonsInterface $allTaxons)
{ {
} }

View file

@ -65,9 +65,9 @@ class FormComponent
FormFactoryInterface $formFactory, FormFactoryInterface $formFactory,
string $resourceClass, string $resourceClass,
string $formClass, string $formClass,
private readonly SlugGeneratorInterface $slugGenerator, protected readonly SlugGeneratorInterface $slugGenerator,
private readonly RepositoryInterface $productAttributeRepository, protected readonly RepositoryInterface $productAttributeRepository,
private readonly ProductFactoryInterface $productFactory, protected readonly ProductFactoryInterface $productFactory,
) { ) {
$this->initialize($productRepository, $formFactory, $resourceClass, $formClass); $this->initialize($productRepository, $formFactory, $resourceClass, $formClass);
} }

View file

@ -36,7 +36,7 @@ class ProductAttributeAutocompleteComponent
use TemplatePropTrait; use TemplatePropTrait;
public function __construct( public function __construct(
private readonly ChecksumCalculator $checksumCalculator, protected readonly ChecksumCalculator $checksumCalculator,
) { ) {
} }

View file

@ -46,8 +46,8 @@ class FormComponent
FormFactoryInterface $formFactory, FormFactoryInterface $formFactory,
string $resourceClass, string $resourceClass,
string $formClass, string $formClass,
private readonly ProductVariantFactoryInterface $productVariantFactory, protected readonly ProductVariantFactoryInterface $productVariantFactory,
private readonly ProductRepositoryInterface $productRepository, protected readonly ProductRepositoryInterface $productRepository,
) { ) {
$this->initialize($productVariantRepository, $formFactory, $resourceClass, $formClass); $this->initialize($productVariantRepository, $formFactory, $resourceClass, $formClass);
} }

View file

@ -30,8 +30,8 @@ class GeneratorInstructionFormComponent
use TemplatePropTrait; use TemplatePropTrait;
public function __construct( public function __construct(
private readonly FormFactoryInterface $formFactory, protected readonly FormFactoryInterface $formFactory,
private readonly string $formClass, protected readonly string $formClass,
) { ) {
} }

View file

@ -19,8 +19,8 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
class NotificationsComponent class NotificationsComponent
{ {
public function __construct( public function __construct(
private readonly NotificationProviderInterface $notificationProvider, protected readonly NotificationProviderInterface $notificationProvider,
private readonly bool $areNotificationsEnabled, protected readonly bool $areNotificationsEnabled,
) { ) {
} }

View file

@ -20,7 +20,7 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
class ShopPreviewComponent class ShopPreviewComponent
{ {
/** @param ChannelRepositoryInterface<ChannelInterface> $channelRepository */ /** @param ChannelRepositoryInterface<ChannelInterface> $channelRepository */
public function __construct(private readonly ChannelRepositoryInterface $channelRepository) public function __construct(protected readonly ChannelRepositoryInterface $channelRepository)
{ {
} }

View file

@ -21,8 +21,8 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
class UserDropdownComponent class UserDropdownComponent
{ {
public function __construct( public function __construct(
private readonly UrlGeneratorInterface $urlGenerator, protected readonly UrlGeneratorInterface $urlGenerator,
private readonly LoggedInAdminUserProviderInterface $loggedInAdminUserProvider, protected readonly LoggedInAdminUserProviderInterface $loggedInAdminUserProvider,
) { ) {
} }

View file

@ -19,7 +19,7 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
class RenderEntityWithTemplateComponent class RenderEntityWithTemplateComponent
{ {
public function __construct( public function __construct(
private EntityManagerInterface $entityManager, protected EntityManagerInterface $entityManager,
) { ) {
} }

View file

@ -37,7 +37,7 @@ final class DeleteComponent
public string $taxonId = ''; public string $taxonId = '';
public function __construct( public function __construct(
private readonly CsrfTokenManagerInterface $csrfTokenManager, protected readonly CsrfTokenManagerInterface $csrfTokenManager,
) { ) {
} }

View file

@ -44,7 +44,7 @@ class FormComponent
FormFactoryInterface $formFactory, FormFactoryInterface $formFactory,
string $resourceClass, string $resourceClass,
string $formClass, string $formClass,
private readonly TaxonSlugGeneratorInterface $slugGenerator, protected readonly TaxonSlugGeneratorInterface $slugGenerator,
) { ) {
$this->initialize($repository, $formFactory, $resourceClass, $formClass); $this->initialize($repository, $formFactory, $resourceClass, $formClass);
} }

View file

@ -33,9 +33,9 @@ class TreeComponent
/** @param TaxonRepositoryInterface<TaxonInterface> $taxonRepository */ /** @param TaxonRepositoryInterface<TaxonInterface> $taxonRepository */
public function __construct( public function __construct(
private readonly AllTaxonsInterface $allTaxons, protected readonly AllTaxonsInterface $allTaxons,
private readonly TaxonRepositoryInterface $taxonRepository, protected readonly TaxonRepositoryInterface $taxonRepository,
private readonly ObjectManager $taxonManager, protected readonly ObjectManager $taxonManager,
) { ) {
} }