Code Duplication    Length = 10-11 lines in 2 locations

src/Dispatcher/ClassDispatcher.php 2 locations

@@ 36-46 (lines=11) @@
33
     *
34
     * @return
35
     */
36
    public function notify($name, $subject)
37
    {
38
        $res = false;
39
        foreach (Reflection::getImplementedClassesAndInterfaces($name) as $cls) {
40
            if (parent::hasListeners($cls)) {
41
                self::doNotify($this->getListeners($cls), $subject);
42
                $res = true;
43
            }
44
        }
45
46
        return $res;
47
    }
48
49
    /**
@@ 57-66 (lines=10) @@
54
     *
55
     * @return \PEIP\INF\Handler\Handler listener which returned a boolean true value
56
     */
57
    public function notifyUntil($name, $subject)
58
    {
59
        $res = null;
60
        foreach (Reflection::getImplementedClassesAndInterfaces($name) as $cls) {
61
            if (!$res && parent::hasListeners($cls)) {
62
                $res = self::doNotifyUntil($this->getListeners($cls), $subject);
63
            }
64
        }
65
66
        return $res;
67
    }
68
69
    /**