Code Duplication    Length = 7-9 lines in 2 locations

lib/private/legacy/util.php 2 locations

@@ 616-622 (lines=7) @@
613
	 */
614
	private static function addExternalResource($application, $prepend, $path, $type = "script") {
615
		if ($type === "style") {
616
			if (!\in_array($path, self::$styles)) {
617
				if ($prepend === true) {
618
					\array_unshift(self::$styles, $path);
619
				} else {
620
					self::$styles[] = $path;
621
				}
622
			}
623
		} elseif ($type === "script") {
624
			if (!\in_array($path, self::$scripts)) {
625
				if ($prepend === true) {
@@ 623-631 (lines=9) @@
620
					self::$styles[] = $path;
621
				}
622
			}
623
		} elseif ($type === "script") {
624
			if (!\in_array($path, self::$scripts)) {
625
				if ($prepend === true) {
626
					\array_unshift(self::$scripts, $path);
627
				} else {
628
					self::$scripts [] = $path;
629
				}
630
			}
631
		}
632
	}
633
634
	/**