Code Duplication    Length = 3-3 lines in 2 locations

src/wp-includes/ms-load.php 1 location

@@ 172-174 (lines=3) @@
169
	 */
170
	$segments = apply_filters( 'site_by_path_segments_count', $segments, $domain, $path );
171
172
	if ( null !== $segments && count( $path_segments ) > $segments ) {
173
		$path_segments = array_slice( $path_segments, 0, $segments );
174
	}
175
176
	$paths = array();
177

src/wp-includes/class-wp-network.php 1 location

@@ 322-324 (lines=3) @@
319
			 */
320
			$segments = apply_filters( 'network_by_path_segments_count', $segments, $domain, $path );
321
322
			if ( ( null !== $segments ) && count( $path_segments ) > $segments ) {
323
				$path_segments = array_slice( $path_segments, 0, $segments );
324
			}
325
326
			while ( count( $path_segments ) ) {
327
				$paths[] = '/' . implode( '/', $path_segments ) . '/';