Code Duplication    Length = 11-11 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 2831-2841 (lines=11) @@
2828
				$plugins_to_install = array();
2829
2830
				// Did user actually select any plugins to install/update ?
2831
				if ( empty( $_POST['plugin'] ) ) {
2832
					if ( 'install' === $install_type ) {
2833
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2834
					} else {
2835
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2836
					}
2837
2838
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2839
2840
					return false;
2841
				}
2842
2843
				if ( is_array( $_POST['plugin'] ) ) {
2844
					$plugins_to_install = (array) $_POST['plugin'];
@@ 2874-2884 (lines=11) @@
2871
				}
2872
2873
				// No need to proceed further if we have no plugins to handle.
2874
				if ( empty( $plugins_to_install ) ) {
2875
					if ( 'install' === $install_type ) {
2876
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2877
					} else {
2878
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2879
					}
2880
2881
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2882
2883
					return false;
2884
				}
2885
2886
				// Pass all necessary information if WP_Filesystem is needed.
2887
				$url = wp_nonce_url(