Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 2894-2904 (lines=11) @@
2891
				$plugins_to_install = array();
2892
2893
				// Did user actually select any plugins to install/update ?
2894
				if ( empty( $_POST['plugin'] ) ) {
2895
					if ( 'install' === $install_type ) {
2896
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2897
					} else {
2898
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2899
					}
2900
2901
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2902
2903
					return false;
2904
				}
2905
2906
				if ( is_array( $_POST['plugin'] ) ) {
2907
					$plugins_to_install = (array) $_POST['plugin'];
@@ 2937-2947 (lines=11) @@
2934
				}
2935
2936
				// No need to proceed further if we have no plugins to handle.
2937
				if ( empty( $plugins_to_install ) ) {
2938
					if ( 'install' === $install_type ) {
2939
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2940
					} else {
2941
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2942
					}
2943
2944
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2945
2946
					return false;
2947
				}
2948
2949
				// Pass all necessary information if WP_Filesystem is needed.
2950
				$url = wp_nonce_url(