Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

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