Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 2806-2816 (lines=11) @@
2803
				$plugins_to_install = array();
2804
2805
				// Did user actually select any plugins to install/update ?
2806
				if ( empty( $_POST['plugin'] ) ) {
2807
					if ( 'install' === $install_type ) {
2808
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2809
					} else {
2810
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2811
					}
2812
2813
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2814
2815
					return false;
2816
				}
2817
2818
				if ( is_array( $_POST['plugin'] ) ) {
2819
					$plugins_to_install = (array) $_POST['plugin'];
@@ 2849-2859 (lines=11) @@
2846
				}
2847
2848
				// No need to proceed further if we have no plugins to handle.
2849
				if ( empty( $plugins_to_install ) ) {
2850
					if ( 'install' === $install_type ) {
2851
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2852
					} else {
2853
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2854
					}
2855
2856
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2857
2858
					return false;
2859
				}
2860
2861
				// Pass all necessary information if WP_Filesystem is needed.
2862
				$url = wp_nonce_url(