Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 4138-4142 (lines=5) @@
4135
4136
			if ( $active_state ) {
4137
				$titles = array();
4138
				foreach ( $active_state as $mod ) {
4139
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4140
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4141
					}
4142
				}
4143
				if ( $titles ) {
4144
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following new modules have been activated: %l.', 'jetpack' ), $titles );
4145
				}
@@ 4150-4154 (lines=5) @@
4147
4148
			if ( $reactive_state = Jetpack::state( 'reactivated_modules' ) ) {
4149
				$titles = array();
4150
				foreach ( explode( ',',  $reactive_state ) as $mod ) {
4151
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4152
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4153
					}
4154
				}
4155
				if ( $titles ) {
4156
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following modules have been updated: %l.', 'jetpack' ), $titles );
4157
				}