Code Duplication    Length = 6-7 lines in 2 locations

app/Api/Controllers/NotificationController.php 2 locations

@@ 53-58 (lines=6) @@
50
           $result = $notification->markSticky(false);
51
        }
52
53
        if ($result === false) {
54
            return $this->response->errorInternal();
55
        }
56
        else {
57
            return $this->response->array(array('statusText' => 'OK'));
58
        }
59
    }
60
61
    /**
@@ 73-79 (lines=7) @@
70
        $notification->body     = $request->body;
71
        $notification->checksum = hash('sha512',$request->user()->user_id.'.LOCAL.'.$request->title);
72
        $notification->source   = $request->user()->user_id;
73
        if ($notification->save())
74
        {
75
            return $this->response->array(array('statusText' => 'OK'));
76
        }
77
        else {
78
            return $this->response->errorInternal();
79
        }
80
    }
81
82
}