Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

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