Code Duplication    Length = 7-9 lines in 2 locations

lib/private/legacy/util.php 2 locations

@@ 579-585 (lines=7) @@
576
	private static function addExternalResource($application, $prepend, $path, $type = "script") {
577
578
		if ($type === "style") {
579
			if (!in_array($path, self::$styles)) {
580
				if ($prepend === true) {
581
					array_unshift ( self::$styles, $path );
582
				} else {
583
					self::$styles[] = $path;
584
				}
585
			}
586
		} elseif ($type === "script") {
587
			if (!in_array($path, self::$scripts)) {
588
				if ($prepend === true) {
@@ 586-594 (lines=9) @@
583
					self::$styles[] = $path;
584
				}
585
			}
586
		} elseif ($type === "script") {
587
			if (!in_array($path, self::$scripts)) {
588
				if ($prepend === true) {
589
					array_unshift ( self::$scripts, $path );
590
				} else {
591
					self::$scripts [] = $path;
592
				}
593
			}
594
		}
595
	}
596
597
	/**