Code Duplication    Length = 7-9 lines in 2 locations

lib/private/legacy/util.php 2 locations

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