Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

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