Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 1092-1101 (lines=10) @@
1089
						echo '<p>', esc_html( $this->strings['plugin_activated'] ), '</p>';
1090
					}
1091
				}
1092
			} elseif ( $this->is_plugin_active( $slug ) ) {
1093
				// No simpler message format provided as this message should never be encountered
1094
				// on the plugin install page.
1095
				echo '<div id="message" class="error"><p>',
1096
					sprintf(
1097
						esc_html( $this->strings['plugin_already_active'] ),
1098
						'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
1099
					),
1100
					'</p></div>';
1101
			} elseif ( $this->does_plugin_require_update( $slug ) ) {
1102
				if ( ! $automatic ) {
1103
					// Make sure message doesn't display again if bulk activation is performed
1104
					// immediately after a single activation.
@@ 1105-1112 (lines=8) @@
1102
				if ( ! $automatic ) {
1103
					// Make sure message doesn't display again if bulk activation is performed
1104
					// immediately after a single activation.
1105
					if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
1106
						echo '<div id="message" class="error"><p>',
1107
							sprintf(
1108
								esc_html( $this->strings['plugin_needs_higher_version'] ),
1109
								'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
1110
							),
1111
							'</p></div>';
1112
					}
1113
				} else {
1114
					// Simpler message layout for use on the plugin install page.
1115
					echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '</p>';