Code Duplication    Length = 9-9 lines in 2 locations

src/EventHandling/DelegateEventHandlingToSpecificMethodTrait.php 1 location

@@ 15-23 (lines=9) @@
12
    /**
13
     * {@inheritDoc}
14
     */
15
    public function handle(DomainMessage $domainMessage)
16
    {
17
        $event  = $domainMessage->getPayload();
18
        $method = $this->getHandleMethodName($event);
19
20
        if ($method) {
21
            $this->$method($event, $domainMessage);
22
        }
23
    }
24
25
    private function getHandleMethodName($event)
26
    {

src/EventHandling/DelegateEventHandlingToSpecificMethodTraitWithDomainMessageAdapter.php 1 location

@@ 15-23 (lines=9) @@
12
    /**
13
     * {@inheritDoc}
14
     */
15
    public function handle(DomainMessage $domainMessage)
16
    {
17
        $event  = $domainMessage->getPayload();
18
        $method = $this->getHandleMethodName($event);
19
20
        if ($method) {
21
            $this->$method($event, new DomainMessageAdapter($domainMessage));
22
        }
23
    }
24
}
25