Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 2848-2858 (lines=11) @@
2845
				$plugins_to_install = array();
2846
2847
				// Did user actually select any plugins to install/update ?
2848
				if ( empty( $_POST['plugin'] ) ) {
2849
					if ( 'install' === $install_type ) {
2850
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2851
					} else {
2852
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2853
					}
2854
2855
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2856
2857
					return false;
2858
				}
2859
2860
				if ( is_array( $_POST['plugin'] ) ) {
2861
					$plugins_to_install = (array) $_POST['plugin'];
@@ 2891-2901 (lines=11) @@
2888
				}
2889
2890
				// No need to proceed further if we have no plugins to handle.
2891
				if ( empty( $plugins_to_install ) ) {
2892
					if ( 'install' === $install_type ) {
2893
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2894
					} else {
2895
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2896
					}
2897
2898
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2899
2900
					return false;
2901
				}
2902
2903
				// Pass all necessary information if WP_Filesystem is needed.
2904
				$url = wp_nonce_url(