Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

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