Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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