Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 2770-2780 (lines=11) @@
2767
				$plugins_to_install = array();
2768
2769
				// Did user actually select any plugins to install/update ?
2770
				if ( empty( $_POST['plugin'] ) ) {
2771
					if ( 'install' === $install_type ) {
2772
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2773
					} else {
2774
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2775
					}
2776
2777
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2778
2779
					return false;
2780
				}
2781
2782
				if ( is_array( $_POST['plugin'] ) ) {
2783
					$plugins_to_install = (array) $_POST['plugin'];
@@ 2813-2823 (lines=11) @@
2810
				}
2811
2812
				// No need to proceed further if we have no plugins to handle.
2813
				if ( empty( $plugins_to_install ) ) {
2814
					if ( 'install' === $install_type ) {
2815
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2816
					} else {
2817
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2818
					}
2819
2820
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2821
2822
					return false;
2823
				}
2824
2825
				// Pass all necessary information if WP_Filesystem is needed.
2826
				$url = wp_nonce_url(