Code Duplication    Length = 3-3 lines in 2 locations

lib/Controller/EndpointController.php 2 locations

@@ 122-124 (lines=3) @@
119
			return new DataResponse(null, Http::STATUS_NOT_FOUND);
120
		}
121
122
		if (!is_int($id) || $id === 0) {
123
			return new DataResponse(null, Http::STATUS_NOT_FOUND);
124
		}
125
126
		$notification = $this->handler->getById($id, $this->getCurrentUser());
127
@@ 151-153 (lines=3) @@
148
	 * @return DataResponse
149
	 */
150
	public function deleteNotification($id = 0) {
151
		if (!is_int($id) || $id === 0) {
152
			return new DataResponse(null, Http::STATUS_NOT_FOUND);
153
		}
154
		$id = (int) $id;
155
156
		$this->handler->deleteById($id, $this->getCurrentUser());