-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the name of the action handler strategy class
- Loading branch information
Rick in t Veld
committed
Aug 22, 2024
1 parent
e379425
commit 111242a
Showing
3 changed files
with
52 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
use App\Action\ActionInterface; | ||
use App\ActionHandler\ActionHandler; | ||
use App\Dto\Aggregator\AggregateRoot; | ||
use App\Manager\ActionHandlerManager; | ||
use App\Strategy\ActionHandlerStrategy; | ||
use Symfony\Component\Console\Attribute\AsCommand; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Helper\QuestionHelper; | ||
|
@@ -28,8 +28,8 @@ class ExportCommand extends Command | |
* @param array<ActionInterface> $exportActions | ||
*/ | ||
public function __construct( | ||
Check failure on line 30 in src/Command/ExportCommand.php GitHub Actions / lint
Check failure on line 30 in src/Command/ExportCommand.php GitHub Actions / lint
|
||
private readonly ActionHandlerManager $actionHandlerManager, | ||
private readonly array $exportActions | ||
private readonly ActionHandlerStrategy $actionHandlerStrategy, | ||
private readonly array $postHooks | ||
) { | ||
parent::__construct(); | ||
} | ||
|
@@ -47,9 +47,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |
$aggregator = new AggregateRoot(); | ||
|
||
/** @var ActionHandler $actionHandler */ | ||
$actionHandler = ($this->actionHandlerManager)($handler); | ||
$actionHandler = ($this->actionHandlerStrategy)($handler); | ||
|
||
foreach ($this->exportActions as $action) { | ||
foreach ($this->postHooks as $action) { | ||
$actionHandler->postHook($action); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters