Code Duplication    Length = 7-9 lines in 2 locations

lib/private/legacy/util.php 2 locations

@@ 557-563 (lines=7) @@
554
	private static function addExternalResource($application, $prepend, $path, $type = "script") {
555
556
		if ($type === "style") {
557
			if (!in_array($path, self::$styles)) {
558
				if ($prepend === true) {
559
					array_unshift ( self::$styles, $path );
560
				} else {
561
					self::$styles[] = $path;
562
				}
563
			}
564
		} elseif ($type === "script") {
565
			if (!in_array($path, self::$scripts)) {
566
				if ($prepend === true) {
@@ 564-572 (lines=9) @@
561
					self::$styles[] = $path;
562
				}
563
			}
564
		} elseif ($type === "script") {
565
			if (!in_array($path, self::$scripts)) {
566
				if ($prepend === true) {
567
					array_unshift ( self::$scripts, $path );
568
				} else {
569
					self::$scripts [] = $path;
570
				}
571
			}
572
		}
573
	}
574
575
	/**