Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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