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'];
@@ 2673-2683 (lines=11) @@
2670
				}
2671
2672
				// No need to proceed further if we have no plugins to handle.
2673
				if ( empty( $plugins_to_install ) ) {
2674
					if ( 'install' === $install_type ) {
2675
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2676
					} else {
2677
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2678
					}
2679
2680
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2681
2682
					return false;
2683
				}
2684
2685
				// Pass all necessary information if WP_Filesystem is needed.
2686
				$url = wp_nonce_url(