Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 2635-2645 (lines=11) @@
2632
				$plugins_to_install = array();
2633
2634
				// Did user actually select any plugins to install/update ?
2635
				if ( empty( $_POST['plugin'] ) ) {
2636
					if ( 'install' === $install_type ) {
2637
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2638
					} else {
2639
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2640
					}
2641
2642
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2643
2644
					return false;
2645
				}
2646
2647
				if ( is_array( $_POST['plugin'] ) ) {
2648
					$plugins_to_install = (array) $_POST['plugin'];
@@ 2678-2688 (lines=11) @@
2675
				}
2676
2677
				// No need to proceed further if we have no plugins to handle.
2678
				if ( empty( $plugins_to_install ) ) {
2679
					if ( 'install' === $install_type ) {
2680
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2681
					} else {
2682
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2683
					}
2684
2685
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2686
2687
					return false;
2688
				}
2689
2690
				// Pass all necessary information if WP_Filesystem is needed.
2691
				$url = wp_nonce_url(