Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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