Code Duplication    Length = 7-7 lines in 2 locations

app/Api/Controllers/NotificationController.php 2 locations

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