Code Duplication    Length = 2-2 lines in 3 locations

src/wp-admin/includes/class-wp-upgrader.php 1 location

@@ 212-213 (lines=2) @@
209
		if ( ! is_object($wp_filesystem) )
210
			return new WP_Error('fs_unavailable', $this->strings['fs_unavailable'] );
211
212
		if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() )
213
			return new WP_Error('fs_error', $this->strings['fs_error'], $wp_filesystem->errors);
214
215
		foreach ( (array)$directories as $dir ) {
216
			switch ( $dir ) {

src/wp-admin/includes/plugin.php 1 location

@@ 818-819 (lines=2) @@
815
	if ( ! is_object($wp_filesystem) )
816
		return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
817
818
	if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() )
819
		return new WP_Error('fs_error', __('Filesystem error.'), $wp_filesystem->errors);
820
821
	// Get the base plugin folder.
822
	$plugins_dir = $wp_filesystem->wp_plugins_dir();

src/wp-admin/includes/theme.php 1 location

@@ 61-62 (lines=2) @@
58
	if ( ! is_object($wp_filesystem) )
59
		return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
60
61
	if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() )
62
		return new WP_Error('fs_error', __('Filesystem error.'), $wp_filesystem->errors);
63
64
	// Get the base plugin folder.
65
	$themes_dir = $wp_filesystem->wp_themes_dir();