diff --git a/Console/Command/AbstractImportOrders.php b/Console/Command/AbstractImportOrders.php index 990bfd5..39931e8 100644 --- a/Console/Command/AbstractImportOrders.php +++ b/Console/Command/AbstractImportOrders.php @@ -15,19 +15,16 @@ abstract class AbstractImportOrders extends Command { /** @var State */ - private $state; + protected $state; /** * AbstractImportOrders constructor. * @param State $state - * @param string|null $name */ - public function __construct( - State $state, - string $name = null - ) { + public function __construct(State $state) + { $this->state = $state; - parent::__construct($name); + parent::__construct(); } /** diff --git a/Console/Command/CleanOffersMapping.php b/Console/Command/CleanOffersMapping.php index b4da5f8..0a8186a 100644 --- a/Console/Command/CleanOffersMapping.php +++ b/Console/Command/CleanOffersMapping.php @@ -27,14 +27,12 @@ class CleanOffersMapping extends Command * CleanOffersMapping constructor. * @param State $state * @param OffersMapping $offersMapping - * @param string|null $name */ public function __construct( State $state, - OffersMapping $offersMapping, - string $name = null + OffersMapping $offersMapping ) { - parent::__construct($name); + parent::__construct(); $this->state = $state; $this->offersMapping = $offersMapping; } diff --git a/Console/Command/ImportOrder.php b/Console/Command/ImportOrder.php index 19de66c..3ea6fd1 100644 --- a/Console/Command/ImportOrder.php +++ b/Console/Command/ImportOrder.php @@ -12,7 +12,7 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use Macopedia\Allegro\Model\OrderImporter\Processor; +use Macopedia\Allegro\Model\OrderImporter\Processor\Proxy; /** * ImportOrder command class @@ -21,29 +21,27 @@ class ImportOrder extends Command { const NAME = 'checkoutFormId'; - /** @var Processor */ - private $processor; + /** @var Proxy */ + protected $processor; /** @var CheckoutFormRepositoryInterface */ - private $checkoutFormRepository; + protected $checkoutFormRepository; /** @var State */ - private $state; + protected $state; /** * ImportOrder constructor. - * @param Processor $processor + * @param Proxy $processor * @param CheckoutFormRepositoryInterface $checkoutFormRepository * @param State $state - * @param string|null $name */ public function __construct( - Processor $processor, + Proxy $processor, CheckoutFormRepositoryInterface $checkoutFormRepository, - State $state, - string $name = null + State $state ) { - parent::__construct($name); + parent::__construct(); $this->processor = $processor; $this->checkoutFormRepository = $checkoutFormRepository; $this->state = $state; @@ -71,7 +69,7 @@ protected function configure() /** * @param InputInterface $input * @param OutputInterface $output - * @return int|void|null + * @return void * @throws LocalizedException */ protected function execute(InputInterface $input, OutputInterface $output) diff --git a/Console/Command/ImportOrders.php b/Console/Command/ImportOrders.php index ce553e4..80da57e 100644 --- a/Console/Command/ImportOrders.php +++ b/Console/Command/ImportOrders.php @@ -15,21 +15,19 @@ class ImportOrders extends AbstractImportOrders { /** @var OrderImporterFactory */ - private $orderImporterFactory; + protected $orderImporterFactory; /** * ImportOrders constructor. * @param OrderImporterFactory $orderImporterFactory * @param State $state - * @param null $name */ public function __construct( OrderImporterFactory $orderImporterFactory, - State $state, - $name = null + State $state ) { $this->orderImporterFactory = $orderImporterFactory; - parent::__construct($state, $name); + parent::__construct($state); } /** diff --git a/Console/Command/ImportOrdersWithErrors.php b/Console/Command/ImportOrdersWithErrors.php index 0d69842..be2b66b 100644 --- a/Console/Command/ImportOrdersWithErrors.php +++ b/Console/Command/ImportOrdersWithErrors.php @@ -15,21 +15,19 @@ class ImportOrdersWithErrors extends AbstractImportOrders { /** @var OrderWithErrorImporterFactory */ - private $orderImporterFactory; + protected $orderImporterFactory; /** * ImportOrdersWithErrors constructor. * @param OrderWithErrorImporterFactory $orderImporterFactory * @param State $state - * @param null $name */ public function __construct( OrderWithErrorImporterFactory $orderImporterFactory, - State $state, - $name = null + State $state ) { $this->orderImporterFactory = $orderImporterFactory; - parent::__construct($state, $name); + parent::__construct($state); } /** diff --git a/README.md b/README.md index cfd276b..5fab758 100644 --- a/README.md +++ b/README.md @@ -200,6 +200,9 @@ Import wszystkich zamówień: Import zamówień z błędami: ``macopedia:allegro:orders-with-errors-import`` +Usunięcie mapowań produktów z nieistniejącymi ofertami: +``macopedia:allegro:clean-offers-mapping`` + ## Konfiguracja MYSQL MQ konfiguracja w pliku config.php