Code Duplication    Length = 3-3 lines in 3 locations

controller/rest/bookmarkcontroller.php 3 locations

@@ 73-75 (lines=3) @@
70
71
		// Check if it is a valid URL
72
		$urlData = parse_url($url);
73
		if ($urlData === false || !isset($urlData['scheme']) || !isset($urlData['host'])) {
74
			return new JSONResponse(array('status' => 'error'), Http::STATUS_BAD_REQUEST);
75
		}
76
77
		$tags = isset($item['tags']) ? $item['tags'] : array();
78
@@ 117-119 (lines=3) @@
114
115
		// Check if it is a valid URL
116
		$urlData = parse_url($url);
117
		if ($urlData === false || !isset($urlData['scheme']) || !isset($urlData['host'])) {
118
			return new JSONResponse(array(), Http::STATUS_BAD_REQUEST);
119
		}
120
121
		if ($record_id == null) {
122
			return new JSONResponse(array(), Http::STATUS_BAD_REQUEST);
@@ 175-177 (lines=3) @@
172
173
		// Check if it is a valid URL
174
		$urlData = parse_url($url);
175
		if ($urlData === false || !isset($urlData['scheme']) || !isset($urlData['host'])) {
176
			return new JSONResponse(array(), Http::STATUS_BAD_REQUEST);
177
		}
178
179
		$query = $this->db->prepareQuery('
180
	UPDATE `*PREFIX*bookmarks`