Code Duplication    Length = 16-16 lines in 2 locations

lib/Model/IndexDocument.php 1 location

@@ 274-289 (lines=16) @@
271
	 *
272
	 * @return array
273
	 */
274
	public function getSubTags($formatted = false) {
275
		if ($formatted === false) {
276
			return $this->subTags;
277
		}
278
279
		$subTags = [];
280
		$ak = array_keys($this->subTags);
281
		foreach ($ak as $source) {
282
			$tags = $this->subTags[$source];
283
			foreach ($tags as $tag) {
284
				$subTags[] = $source . '_' . $tag;
285
			}
286
		}
287
288
		return $subTags;
289
	}
290
291
	/**
292
	 * @param string $k

lib/Model/SearchRequest.php 1 location

@@ 415-430 (lines=16) @@
412
	 *
413
	 * @return array
414
	 */
415
	public function getSubTags($formatted = false) {
416
		if ($formatted === false) {
417
			return $this->subTags;
418
		}
419
420
		$subTags = [];
421
		$ak = array_keys($this->subTags);
422
		foreach ($ak as $source) {
423
			$tags = $this->subTags[$source];
424
			foreach ($tags as $tag) {
425
				$subTags[] = $source . '_' . $tag;
426
			}
427
		}
428
429
		return $subTags;
430
	}
431
432
	/**
433
	 * @param string $source