Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 245-247 (lines=3) @@
242
			 */
243
			$segments = apply_filters( 'network_by_path_segments_count', $segments, $domain, $path );
244
245
			if ( ( null !== $segments ) && count( $path_segments ) > $segments ) {
246
				$path_segments = array_slice( $path_segments, 0, $segments );
247
			}
248
249
			while ( count( $path_segments ) ) {
250
				$paths[] = '/' . implode( '/', $path_segments ) . '/';

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

@@ 183-185 (lines=3) @@
180
	 */
181
	$segments = apply_filters( 'site_by_path_segments_count', $segments, $domain, $path );
182
183
	if ( null !== $segments && count( $path_segments ) > $segments ) {
184
		$path_segments = array_slice( $path_segments, 0, $segments );
185
	}
186
187
	$paths = array();
188