Code Duplication    Length = 3-6 lines in 3 locations

class-tgm-plugin-activation.php 3 locations

@@ 826-829 (lines=4) @@
823
					return true;
824
				}
825
826
				if ( ! WP_Filesystem( $creds ) ) {
827
					request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, array() ); // Setup WP_Filesystem.
828
					return true;
829
				}
830
831
				/* If we arrive here, we have the filesystem. */
832
@@ 2883-2885 (lines=3) @@
2880
				$method = ''; // Leave blank so WP_Filesystem can populate it as necessary.
2881
				$fields = array_keys( $_POST ); // Extra fields to pass to WP_Filesystem.
2882
2883
				if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, $fields ) ) ) {
2884
					return true; // Stop the normal page form from displaying, credential request form will be shown.
2885
				}
2886
2887
				// Now we have some credentials, setup WP_Filesystem.
2888
				if ( ! WP_Filesystem( $creds ) ) {
@@ 2888-2893 (lines=6) @@
2885
				}
2886
2887
				// Now we have some credentials, setup WP_Filesystem.
2888
				if ( ! WP_Filesystem( $creds ) ) {
2889
					// Our credentials were no good, ask the user for them again.
2890
					request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, $fields );
2891
2892
					return true;
2893
				}
2894
2895
				/* If we arrive here, we have the filesystem */
2896