Code Duplication    Length = 7-9 lines in 2 locations

lib/private/legacy/util.php 2 locations

@@ 641-647 (lines=7) @@
638
	 */
639
	private static function addExternalResource($application, $prepend, $path, $type = "script") {
640
		if ($type === "style") {
641
			if (!\in_array($path, self::$styles)) {
642
				if ($prepend === true) {
643
					\array_unshift(self::$styles, $path);
644
				} else {
645
					self::$styles[] = $path;
646
				}
647
			}
648
		} elseif ($type === "script") {
649
			if (!\in_array($path, self::$scripts)) {
650
				if ($prepend === true) {
@@ 648-656 (lines=9) @@
645
					self::$styles[] = $path;
646
				}
647
			}
648
		} elseif ($type === "script") {
649
			if (!\in_array($path, self::$scripts)) {
650
				if ($prepend === true) {
651
					\array_unshift(self::$scripts, $path);
652
				} else {
653
					self::$scripts [] = $path;
654
				}
655
			}
656
		}
657
	}
658
659
	/**