Code Duplication    Length = 7-7 lines in 2 locations

PHPDaemon/PubSub/PubSub.php 2 locations

@@ 71-77 (lines=7) @@
68
     * @param  object $obj Subscriber
69
     * @return boolean      Success
70
     */
71
    public function unsub($id, $obj)
72
    {
73
        if (!isset($this->events[$id])) {
74
            return false;
75
        }
76
        return $this->events[$id]->unsub($obj);
77
    }
78
79
    /**
80
     * Publish
@@ 85-91 (lines=7) @@
82
     * @param  mixed $data Data
83
     * @return boolean       Success
84
     */
85
    public function pub($id, $data)
86
    {
87
        if (!isset($this->events[$id])) {
88
            return false;
89
        }
90
        return $this->events[$id]->pub($data);
91
    }
92
93
    /**
94
     * Unsubscribe object from all events