Code Duplication    Length = 4-5 lines in 2 locations

Ubiquity/controllers/Router.php 2 locations

@@ 179-183 (lines=5) @@
176
		$paramsOrder = $routeArray ["details"] ["parameters"];
177
		$index = 0;
178
		foreach ( $paramsOrder as $order ) {
179
			if ($order === "*") {
180
				if (isset ( $params [$index] ))
181
					$result = \array_merge ( $result, \array_diff ( \explode ( "/", $params [$index] ), [ "" ] ) );
182
				break;
183
			}
184
			if (\substr ( $order, 0, 1 ) === "~") {
185
				$order = \intval ( \substr ( $order, 1, 1 ) );
186
				if (isset ( $params [$order] )) {
@@ 186-189 (lines=4) @@
183
			}
184
			if (\substr ( $order, 0, 1 ) === "~") {
185
				$order = \intval ( \substr ( $order, 1, 1 ) );
186
				if (isset ( $params [$order] )) {
187
					$result = \array_merge ( $result, \array_diff ( \explode ( "/", $params [$order] ), [ "" ] ) );
188
					break;
189
				}
190
			}
191
			$result [] = self::cleanParam ( $params [$order] );
192
			unset ( $params [$order] );