Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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