Code Duplication    Length = 4-6 lines in 2 locations

includes/class-sensei-language-pack-manager.php 2 locations

@@ 203-206 (lines=4) @@
200
			exit;
201
		}
202
203
		if ( false === ( $creds = request_filesystem_credentials( $url, '', false, false, null ) ) ) {
204
			wp_redirect( add_query_arg( array( 'translation_updated' => 4 ), $settings_url ) );
205
			exit;
206
		}
207
208
		if ( ! WP_Filesystem( $creds ) ) {
209
			request_filesystem_credentials( $url, '', true, false, null );
@@ 208-213 (lines=6) @@
205
			exit;
206
		}
207
208
		if ( ! WP_Filesystem( $creds ) ) {
209
			request_filesystem_credentials( $url, '', true, false, null );
210
211
			wp_redirect( add_query_arg( array( 'translation_updated' => 4 ), $settings_url ) );
212
			exit;
213
		}
214
215
		// Download the language pack
216
		$response = wp_safe_remote_get( self::get_package_uri( $locale ), array( 'timeout' => 60 ) );