Code Duplication    Length = 9-9 lines in 2 locations

src/Comodojo/Dispatcher/Components/EventsManager.php 2 locations

@@ 46-54 (lines=9) @@
43
44
    }
45
46
    public function subscribe($event, $class, $priority = 0) {
47
48
        $callable = $this->convertToListener($class, $event);
49
50
        if ( $callable === false ) return null;
51
52
        return $this->addListener($event, $callable, $priority);
53
54
    }
55
56
    public function subscribeOnce($event, $class, $priority = 0) {
57
@@ 56-64 (lines=9) @@
53
54
    }
55
56
    public function subscribeOnce($event, $class, $priority = 0) {
57
58
        $callable = $this->convertToListener($class, $event);
59
60
        if ( $callable === false ) return null;
61
62
        return $this->addOneTimeListener($event, $callable, $priority);
63
64
    }
65
66
    protected function convertToListener($class, $event) {
67