Code Duplication    Length = 9-9 lines in 2 locations

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

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