Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 79-85 (lines=7) @@
76
        }
77
    }
78
79
    private function loadCommandHandlerAndAggregate(CommandWithMetadata $command): CommandHandlerAndAggregate
80
    {
81
        return new CommandHandlerAndAggregate(
82
            $this->commandSubscriber->getHandlerForCommand($command->getCommand()),
83
            $this->aggregateRepository->loadAggregate($this->commandSubscriber->getHandlerForCommand($command->getCommand())->getHandlerClass(), $command->getAggregateId())
84
        );
85
    }
86
87
    private function decorateEventWithMetaData($event, MetaData $metaData): EventWithMetaData
88
    {

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

@@ 78-84 (lines=7) @@
75
        }
76
    }
77
78
    private function loadCommandHandlerAndAggregate(CommandWithMetadata $command): CommandHandlerAndAggregate
79
    {
80
        return new CommandHandlerAndAggregate(
81
            $this->commandSubscriber->getHandlerForCommand($command->getCommand()),
82
            $this->aggregateRepository->loadAggregate($this->commandSubscriber->getHandlerForCommand($command->getCommand())->getHandlerClass(), $command->getAggregateId())
83
        );
84
    }
85
86
    private function decorateEventWithMetaData($event, MetaData $metaData): EventWithMetaData
87
    {