Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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