Code Duplication    Length = 10-10 lines in 2 locations

admin/includes/class-tgm-plugin-activation.php 2 locations

@@ 2641-2650 (lines=10) @@
2638
				$plugins_to_install = array();
2639
2640
				// Did user actually select any plugins to install/update ?
2641
				if ( empty( $_POST['plugin'] ) ) {
2642
					if ( 'install' === $install_type ) {
2643
						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2644
					} else {
2645
						$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
2646
					}
2647
2648
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2649
2650
					return false;
2651
				}
2652
2653
				if ( is_array( $_POST['plugin'] ) ) {
@@ 2679-2688 (lines=10) @@
2676
				}
2677
2678
				// No need to proceed further if we have no plugins to handle.
2679
				if ( empty( $plugins_to_install ) ) {
2680
					if ( 'install' === $install_type ) {
2681
						$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
2682
					} else {
2683
						$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
2684
					}
2685
2686
					echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
2687
2688
					return false;
2689
				}
2690
2691
				// Pass all necessary information if WP_Filesystem is needed.