Code Duplication    Length = 4-5 lines in 2 locations

controller/notesapicontroller.php 2 locations

@@ 99-103 (lines=5) @@
96
    public function get($id, $exclude='') {
97
        $exclude = explode(',', $exclude);
98
99
        return $this->respond(function () use ($id, $exclude) {
100
            $note = $this->service->get($id, $this->userSession->getUser()->getUID());
101
            $note = $this->excludeFields($note, $exclude);
102
            return $note;
103
        });
104
    }
105
106
@@ 117-120 (lines=4) @@
114
     * @return DataResponse
115
     */
116
    public function create($content, $favorite=null) {
117
        return $this->respond(function () use ($content, $favorite) {
118
            $note = $this->service->create($this->userSession->getUser()->getUID());
119
            return $this->updateData($note->getId(), $content, $favorite);
120
        });
121
    }
122
123