Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

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