Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 2871-2881 (lines=11) @@
2868
				$plugins_to_install = array();
2869
2870
				// Did user actually select any plugins to install/update ?
2871
				if ( empty( $_POST['plugin'] ) ) {
2872
					if ( 'install' === $install_type ) {
2873
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2874
					} else {
2875
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2876
					}
2877
2878
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2879
2880
					return false;
2881
				}
2882
2883
				if ( is_array( $_POST['plugin'] ) ) {
2884
					$plugins_to_install = (array) $_POST['plugin'];
@@ 2914-2924 (lines=11) @@
2911
				}
2912
2913
				// No need to proceed further if we have no plugins to handle.
2914
				if ( empty( $plugins_to_install ) ) {
2915
					if ( 'install' === $install_type ) {
2916
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2917
					} else {
2918
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2919
					}
2920
2921
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2922
2923
					return false;
2924
				}
2925
2926
				// Pass all necessary information if WP_Filesystem is needed.
2927
				$url = wp_nonce_url(