Code Duplication    Length = 11-12 lines in 2 locations

src/Offer/AbstractGeoCoordinatesProcessManager.php 1 location

@@ 48-58 (lines=11) @@
45
    /**
46
     * @param DomainMessage $domainMessage
47
     */
48
    public function handle(DomainMessage $domainMessage)
49
    {
50
        $payload = $domainMessage->getPayload();
51
        $className = get_class($payload);
52
        $eventHandlers = $this->getEventHandlers();
53
54
        if (isset($eventHandlers[$className])) {
55
            $eventHandler = $eventHandlers[$className];
56
            call_user_func([$this, $eventHandler], $payload);
57
        }
58
    }
59
}
60

src/Offer/OfferCommandHandler.php 1 location

@@ 87-98 (lines=12) @@
84
    /**
85
     * {@inheritdoc}
86
     */
87
    public function handle($command)
88
    {
89
        $commandName = get_class($command);
90
        $commandHandlers = $this->getCommandHandlers();
91
92
        if (isset($commandHandlers[$commandName])) {
93
            $handler = $commandHandlers[$commandName];
94
            call_user_func(array($this, $handler), $command);
95
        } else {
96
            parent::handle($command);
97
        }
98
    }
99
100
    /**
101
     * @return string[]