Code Duplication    Length = 3-6 lines in 3 locations

inc/vendor/tgmpa/tgm-plugin-activation/class-tgm-plugin-activation.php 3 locations

@@ 840-843 (lines=4) @@
837
					return true;
838
				}
839
840
				if ( ! WP_Filesystem( $creds ) ) {
841
					request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, array() ); // Setup WP_Filesystem.
842
					return true;
843
				}
844
845
				/* If we arrive here, we have the filesystem. */
846
@@ 2915-2917 (lines=3) @@
2912
				$method = ''; // Leave blank so WP_Filesystem can populate it as necessary.
2913
				$fields = array_keys( $_POST ); // Extra fields to pass to WP_Filesystem.
2914
2915
				if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, $fields ) ) ) {
2916
					return true; // Stop the normal page form from displaying, credential request form will be shown.
2917
				}
2918
2919
				// Now we have some credentials, setup WP_Filesystem.
2920
				if ( ! WP_Filesystem( $creds ) ) {
@@ 2920-2925 (lines=6) @@
2917
				}
2918
2919
				// Now we have some credentials, setup WP_Filesystem.
2920
				if ( ! WP_Filesystem( $creds ) ) {
2921
					// Our credentials were no good, ask the user for them again.
2922
					request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, $fields );
2923
2924
					return true;
2925
				}
2926
2927
				/* If we arrive here, we have the filesystem */
2928