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

@@ 454-469 (lines=16) @@
451
	 *
452
	 * @return array
453
	 */
454
	public function getSubTags($formatted = false) {
455
		if ($formatted === false) {
456
			return $this->subTags;
457
		}
458
459
		$subTags = [];
460
		$ak = array_keys($this->subTags);
461
		foreach ($ak as $source) {
462
			$tags = $this->subTags[$source];
463
			foreach ($tags as $tag) {
464
				$subTags[] = $source . '_' . $tag;
465
			}
466
		}
467
468
		return $subTags;
469
	}
470
471
	/**
472
	 * @param string $source