Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 2841-2851 (lines=11) @@
2838
				$plugins_to_install = array();
2839
2840
				// Did user actually select any plugins to install/update ?
2841
				if ( empty( $_POST['plugin'] ) ) {
2842
					if ( 'install' === $install_type ) {
2843
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2844
					} else {
2845
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2846
					}
2847
2848
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2849
2850
					return false;
2851
				}
2852
2853
				if ( is_array( $_POST['plugin'] ) ) {
2854
					$plugins_to_install = (array) $_POST['plugin'];
@@ 2884-2894 (lines=11) @@
2881
				}
2882
2883
				// No need to proceed further if we have no plugins to handle.
2884
				if ( empty( $plugins_to_install ) ) {
2885
					if ( 'install' === $install_type ) {
2886
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2887
					} else {
2888
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2889
					}
2890
2891
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2892
2893
					return false;
2894
				}
2895
2896
				// Pass all necessary information if WP_Filesystem is needed.
2897
				$url = wp_nonce_url(