Code Duplication    Length = 8-8 lines in 2 locations

Service/Manager.php 1 location

@@ 735-742 (lines=8) @@
732
        }
733
    }
734
735
    private function dispatch($eventName, $event)
736
    {
737
        if (class_exists(LegacyEventDispatcherProxy::class)) {
738
            return $this->eventDispatcher->dispatch($event, $eventName);
739
        } else {
740
            return $this->eventDispatcher->dispatch($eventName, $event);
741
        }
742
    }
743
}
744

Service/ManagerFactory.php 1 location

@@ 172-179 (lines=8) @@
169
        return $manager;
170
    }
171
172
    private function dispatch($eventName, $event)
173
    {
174
        if (class_exists(LegacyEventDispatcherProxy::class)) {
175
            return $this->eventDispatcher->dispatch($event, $eventName);
176
        } else {
177
            return $this->eventDispatcher->dispatch($eventName, $event);
178
        }
179
    }
180
}
181