Code Duplication    Length = 7-9 lines in 2 locations

controller/ownnotev2apicontroller.php 2 locations

@@ 67-73 (lines=7) @@
64
	 * @NoAdminRequired
65
	 * @NoCSRFRequired
66
	 */
67
	public function get($id) {
68
		$results = $this->noteService->find($id);
69
		if (!$results) {
70
			return new NotFoundJSONResponse();
71
		}
72
		return new JSONResponse($results);
73
	}
74
75
76
	/**
@@ 117-125 (lines=9) @@
114
	 * @NoAdminRequired
115
	 * @NoCSRFRequired
116
	 */
117
	public function delete($id) {
118
		$entity = $this->noteService->find($id);
119
		if (!$entity) {
120
			return new NotFoundJSONResponse();
121
		}
122
123
		$results = $this->noteService->delete($id);
124
		return new JSONResponse($results);
125
	}
126
127
}
128