Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 2684-2694 (lines=11) @@
2681
				$plugins_to_install = array();
2682
2683
				// Did user actually select any plugins to install/update ?
2684
				if ( empty( $_POST['plugin'] ) ) {
2685
					if ( 'install' === $install_type ) {
2686
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2687
					} else {
2688
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2689
					}
2690
2691
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2692
2693
					return false;
2694
				}
2695
2696
				if ( is_array( $_POST['plugin'] ) ) {
2697
					$plugins_to_install = (array) $_POST['plugin'];
@@ 2727-2737 (lines=11) @@
2724
				}
2725
2726
				// No need to proceed further if we have no plugins to handle.
2727
				if ( empty( $plugins_to_install ) ) {
2728
					if ( 'install' === $install_type ) {
2729
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2730
					} else {
2731
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2732
					}
2733
2734
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2735
2736
					return false;
2737
				}
2738
2739
				// Pass all necessary information if WP_Filesystem is needed.
2740
				$url = wp_nonce_url(