Code Duplication    Length = 7-9 lines in 2 locations

lib/private/legacy/util.php 2 locations

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