Code Duplication    Length = 7-7 lines in 2 locations

app/Api/Controllers/NotificationController.php 2 locations

@@ 51-57 (lines=7) @@
48
                $read->user_id          = $request->user()->user_id;
49
                $read->key              = $action;
50
                $read->value            = 1;
51
                if ($read->save())
52
                {
53
                    return $this->response->array(array('statusText'=>'OK'));
54
                }
55
                else {
56
                    return $this->response->errorInternal();
57
                }
58
            }
59
        }
60
        elseif ($action === 'unread' || $action === 'unsticky')
@@ 62-68 (lines=7) @@
59
        }
60
        elseif ($action === 'unread' || $action === 'unsticky')
61
        {
62
            if (NotificationAttrib::where('notifications_id', $id)->delete() >= 0)
63
            {
64
                return $this->response->array(array('statusText'=>'OK'));
65
            }
66
            else {
67
                return $this->response->errorInternal();
68
            }
69
        }
70
    }
71