Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 4189-4193 (lines=5) @@
4186
4187
			if ( $active_state ) {
4188
				$titles = array();
4189
				foreach ( $active_state as $mod ) {
4190
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4191
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4192
					}
4193
				}
4194
				if ( $titles ) {
4195
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following new modules have been activated: %l.', 'jetpack' ), $titles );
4196
				}
@@ 4201-4205 (lines=5) @@
4198
4199
			if ( $reactive_state = Jetpack::state( 'reactivated_modules' ) ) {
4200
				$titles = array();
4201
				foreach ( explode( ',',  $reactive_state ) as $mod ) {
4202
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4203
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4204
					}
4205
				}
4206
				if ( $titles ) {
4207
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following modules have been updated: %l.', 'jetpack' ), $titles );
4208
				}