Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 3838-3842 (lines=5) @@
3835
3836
			if ( $active_state ) {
3837
				$titles = array();
3838
				foreach ( $active_state as $mod ) {
3839
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
3840
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
3841
					}
3842
				}
3843
				if ( $titles ) {
3844
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following new modules have been activated: %l.', 'jetpack' ), $titles );
3845
				}
@@ 3850-3854 (lines=5) @@
3847
3848
			if ( $reactive_state = Jetpack::state( 'reactivated_modules' ) ) {
3849
				$titles = array();
3850
				foreach ( explode( ',',  $reactive_state ) as $mod ) {
3851
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
3852
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
3853
					}
3854
				}
3855
				if ( $titles ) {
3856
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following modules have been updated: %l.', 'jetpack' ), $titles );
3857
				}