Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 2772-2782 (lines=11) @@
2769
				$plugins_to_install = array();
2770
2771
				// Did user actually select any plugins to install/update ?
2772
				if ( empty( $_POST['plugin'] ) ) {
2773
					if ( 'install' === $install_type ) {
2774
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2775
					} else {
2776
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2777
					}
2778
2779
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2780
2781
					return false;
2782
				}
2783
2784
				if ( is_array( $_POST['plugin'] ) ) {
2785
					$plugins_to_install = (array) $_POST['plugin'];
@@ 2815-2825 (lines=11) @@
2812
				}
2813
2814
				// No need to proceed further if we have no plugins to handle.
2815
				if ( empty( $plugins_to_install ) ) {
2816
					if ( 'install' === $install_type ) {
2817
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2818
					} else {
2819
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2820
					}
2821
2822
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2823
2824
					return false;
2825
				}
2826
2827
				// Pass all necessary information if WP_Filesystem is needed.
2828
				$url = wp_nonce_url(