Code Duplication    Length = 7-7 lines in 3 locations

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

@@ 167-173 (lines=7) @@
164
            $response->setSuccess(false)->addErrorMessage('Unable to triggerEvent');
165
    }
166
167
    public function unsubscribeByUser(Response $response, $user_id)
168
    {
169
        $handler = Notifications::getInstance()->getHandlerNotification();
170
        $ret = $handler->unsubscribeByUser($user_id);
171
        if (!ret)
172
            $response->setSuccess(false)->addErrorMessage('Unable to unsubscribeByUser');
173
    }
174
    
175
    public function unsubscribe(Response $response, $category, $item_id, $events, $module_id = null, $user_id = null)
176
    {
@@ 183-189 (lines=7) @@
180
            $response->setSuccess(false)->addErrorMessage('Unable to unsubscribe');
181
    }
182
183
    public function unsubscribeByModule(Response $response, $module_id)
184
    {
185
        $handler = Notifications::getInstance()->getHandlerNotification();
186
        $ret = $handler->unsubscribeByModule($module_id);
187
        if (!ret)
188
            $response->setSuccess(false)->addErrorMessage('Unable to unsubscribeByModule');
189
    }
190
191
    public function unsubscribeByItem(Response $response, $module_id, $category, $item_id)
192
    {
@@ 191-197 (lines=7) @@
188
            $response->setSuccess(false)->addErrorMessage('Unable to unsubscribeByModule');
189
    }
190
191
    public function unsubscribeByItem(Response $response, $module_id, $category, $item_id)
192
    {
193
        $handler = Notifications::getInstance()->getHandlerNotification();
194
        $ret = $handler->unsubscribeByItem($module_id, $category, $item_id);
195
        if (!ret)
196
            $response->setSuccess(false)->addErrorMessage('Unable to unsubscribeByItem');
197
    }
198
199
    public function doLoginMaintenance(Response $response, $user_id)
200
    {