Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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