Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 4042-4046 (lines=5) @@
4039
4040
			if ( $active_state ) {
4041
				$titles = array();
4042
				foreach ( $active_state as $mod ) {
4043
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4044
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4045
					}
4046
				}
4047
				if ( $titles ) {
4048
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following new modules have been activated: %l.', 'jetpack' ), $titles );
4049
				}
@@ 4054-4058 (lines=5) @@
4051
4052
			if ( $reactive_state = Jetpack::state( 'reactivated_modules' ) ) {
4053
				$titles = array();
4054
				foreach ( explode( ',',  $reactive_state ) as $mod ) {
4055
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4056
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4057
					}
4058
				}
4059
				if ( $titles ) {
4060
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following modules have been updated: %l.', 'jetpack' ), $titles );
4061
				}