| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class DummyCommandHandler |
||
| 14 | { |
||
| 15 | private array $commandToMethodMap = [ |
||
| 16 | PerformDummyTask::class => 'performDummyTask', |
||
| 17 | IgnoredCommand::class => 'dontDoAnything', |
||
| 18 | ExceptionInducingCommand::class => 'throwAnException', |
||
| 19 | DummyIncrementCommand::class => 'increment', |
||
| 20 | ]; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @phpstan-var AggregateRootRepository<DummyAggregate> |
||
| 24 | */ |
||
| 25 | private AggregateRootRepository $repository; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @phpstan-param AggregateRootRepository<DummyAggregate> $repository |
||
| 29 | */ |
||
| 30 | public function __construct(AggregateRootRepository $repository) |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @throws DummyException |
||
| 37 | */ |
||
| 38 | public function handle(DummyCommand $command): void |
||
| 59 |