Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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