Skip to content

Commit

Permalink
Adjust code for Magento 2.4.2 (#97)
Browse files Browse the repository at this point in the history
Co-authored-by: Maksymilian Strzyżewski <[email protected]>
  • Loading branch information
mstrzyzewski and Maksymilian Strzyżewski authored Jun 1, 2021
1 parent 0155bbb commit c1e097d
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 33 deletions.
11 changes: 4 additions & 7 deletions Console/Command/AbstractImportOrders.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down
6 changes: 2 additions & 4 deletions Console/Command/CleanOffersMapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
22 changes: 10 additions & 12 deletions Console/Command/ImportOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 3 additions & 5 deletions Console/Command/ImportOrders.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
8 changes: 3 additions & 5 deletions Console/Command/ImportOrdersWithErrors.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1e097d

Please sign in to comment.