Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 4129-4133 (lines=5) @@
4126
4127
			if ( $active_state ) {
4128
				$titles = array();
4129
				foreach ( $active_state as $mod ) {
4130
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4131
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4132
					}
4133
				}
4134
				if ( $titles ) {
4135
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following new modules have been activated: %l.', 'jetpack' ), $titles );
4136
				}
@@ 4141-4145 (lines=5) @@
4138
4139
			if ( $reactive_state = Jetpack::state( 'reactivated_modules' ) ) {
4140
				$titles = array();
4141
				foreach ( explode( ',',  $reactive_state ) as $mod ) {
4142
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4143
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4144
					}
4145
				}
4146
				if ( $titles ) {
4147
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following modules have been updated: %l.', 'jetpack' ), $titles );
4148
				}