Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 2896-2906 (lines=11) @@
2893
				$plugins_to_install = array();
2894
2895
				// Did user actually select any plugins to install/update ?
2896
				if ( empty( $_POST['plugin'] ) ) {
2897
					if ( 'install' === $install_type ) {
2898
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2899
					} else {
2900
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2901
					}
2902
2903
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2904
2905
					return false;
2906
				}
2907
2908
				if ( is_array( $_POST['plugin'] ) ) {
2909
					$plugins_to_install = (array) $_POST['plugin'];
@@ 2939-2949 (lines=11) @@
2936
				}
2937
2938
				// No need to proceed further if we have no plugins to handle.
2939
				if ( empty( $plugins_to_install ) ) {
2940
					if ( 'install' === $install_type ) {
2941
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2942
					} else {
2943
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2944
					}
2945
2946
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2947
2948
					return false;
2949
				}
2950
2951
				// Pass all necessary information if WP_Filesystem is needed.
2952
				$url = wp_nonce_url(