Code Duplication    Length = 16-16 lines in 2 locations

src/Gica/Cqrs/Command/CommandTester/DefaultCommandTester.php 1 location

@@ 51-66 (lines=16) @@
48
     */
49
    private $commandMetadataFactory;
50
51
    public function __construct(
52
        CommandSubscriber $commandSubscriber,
53
        CommandApplier $commandApplier,
54
        AggregateRepository $aggregateRepository,
55
        EventsApplierOnAggregate $eventsApplier,
56
        EventMetadataFactory $eventMetadataFactory,
57
        CommandMetadataFactory $commandMetadataFactory
58
    )
59
    {
60
        $this->commandSubscriber = $commandSubscriber;
61
        $this->commandApplier = $commandApplier;
62
        $this->aggregateRepository = $aggregateRepository;
63
        $this->eventsApplierOnAggregate = $eventsApplier;
64
        $this->eventMetadataFactory = $eventMetadataFactory;
65
        $this->commandMetadataFactory = $commandMetadataFactory;
66
    }
67
68
    public function canExecuteCommand(Command $command): bool
69
    {

src/Gica/Cqrs/Command/CommandTester/DefaultCommandTesterWithExplanation.php 1 location

@@ 50-65 (lines=16) @@
47
     */
48
    private $commandMetadataFactory;
49
50
    public function __construct(
51
        CommandSubscriber $commandSubscriber,
52
        CommandApplier $commandApplier,
53
        AggregateRepository $aggregateRepository,
54
        EventsApplierOnAggregate $eventsApplier,
55
        EventMetadataFactory $eventMetadataFactory,
56
        CommandMetadataFactory $commandMetadataFactory
57
    )
58
    {
59
        $this->commandSubscriber = $commandSubscriber;
60
        $this->commandApplier = $commandApplier;
61
        $this->aggregateRepository = $aggregateRepository;
62
        $this->eventsApplierOnAggregate = $eventsApplier;
63
        $this->eventMetadataFactory = $eventMetadataFactory;
64
        $this->commandMetadataFactory = $commandMetadataFactory;
65
    }
66
67
    public function whyCantExecuteCommand(Command $command)
68
    {