Code Duplication    Length = 8-10 lines in 2 locations

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

@@ 977-986 (lines=10) @@
974
						echo '<p>', esc_html( $this->strings['plugin_activated'] ), '</p>';
975
					}
976
				}
977
			} elseif ( $this->is_plugin_active( $slug ) ) {
978
				// No simpler message format provided as this message should never be encountered
979
				// on the plugin install page.
980
				echo '<div id="message" class="error"><p>',
981
					sprintf(
982
						esc_html( $this->strings['plugin_already_active'] ),
983
						'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
984
					),
985
					'</p></div>';
986
			} elseif ( $this->does_plugin_require_update( $slug ) ) {
987
				if ( ! $automatic ) {
988
					// Make sure message doesn't display again if bulk activation is performed
989
					// immediately after a single activation.
@@ 990-997 (lines=8) @@
987
				if ( ! $automatic ) {
988
					// Make sure message doesn't display again if bulk activation is performed
989
					// immediately after a single activation.
990
					if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
991
						echo '<div id="message" class="error"><p>',
992
							sprintf(
993
								esc_html( $this->strings['plugin_needs_higher_version'] ),
994
								'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
995
							),
996
							'</p></div>';
997
					}
998
				} else {
999
					// Simpler message layout for use on the plugin install page.
1000
					echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '</p>';