Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 2904-2914 (lines=11) @@
2901
				$plugins_to_install = array();
2902
2903
				// Did user actually select any plugins to install/update ?
2904
				if ( empty( $_POST['plugin'] ) ) {
2905
					if ( 'install' === $install_type ) {
2906
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2907
					} else {
2908
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2909
					}
2910
2911
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2912
2913
					return false;
2914
				}
2915
2916
				if ( is_array( $_POST['plugin'] ) ) {
2917
					$plugins_to_install = (array) $_POST['plugin'];
@@ 2947-2957 (lines=11) @@
2944
				}
2945
2946
				// No need to proceed further if we have no plugins to handle.
2947
				if ( empty( $plugins_to_install ) ) {
2948
					if ( 'install' === $install_type ) {
2949
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2950
					} else {
2951
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2952
					}
2953
2954
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2955
2956
					return false;
2957
				}
2958
2959
				// Pass all necessary information if WP_Filesystem is needed.
2960
				$url = wp_nonce_url(