Code Duplication    Length = 7-15 lines in 2 locations

htdocs/modules/notifications/class/NotificationsProvider.php 2 locations

@@ 95-101 (lines=7) @@
92
        $response->setValue((int)$ret);
93
    }
94
    
95
    public function subscribe(Response $response, $category, $item_id, $events, $mode = null, $module_id = null, $user_id = null)
96
    {
97
        $handler = Notifications::getInstance()->getHandlerNotification();
98
        $ret = $handler->suscribe($category, $item_id, $events, $mode, $module_id, $user_id);
99
        if (!$ret)
100
            $response->setSuccess(false)->addErrorMessage('Unable to suscribe');
101
    }
102
103
    public function getByUser(Response $response, $user_id)
104
    {
@@ 124-138 (lines=15) @@
121
        $response->setValue($ret);
122
    }
123
    
124
    public function triggerEvents(
125
        Response $response,
126
        $category,
127
        $item_id,
128
        $events,
129
        $extra_tags = array(),
130
        $user_list = array(),
131
        $module_id = null,
132
        $omit_user_id = null
133
    ) {
134
        $handler = Notifications::getInstance()->getHandlerNotification();
135
        $ret = $handler->triggerEvents($category, $item_id, $events, $extra_tags, $user_list, $module_id, $omit_user_id);
136
        if (!ret)
137
            $response->setSuccess(false)->addErrorMessage('Unable to triggerEvents');
138
    }
139
    
140
    public function triggerEvent(
141
        Response $response,