Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 3820-3824 (lines=5) @@
3817
3818
			if ( $active_state ) {
3819
				$titles = array();
3820
				foreach ( $active_state as $mod ) {
3821
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
3822
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
3823
					}
3824
				}
3825
				if ( $titles ) {
3826
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following new modules have been activated: %l.', 'jetpack' ), $titles );
3827
				}
@@ 3832-3836 (lines=5) @@
3829
3830
			if ( $reactive_state = Jetpack::state( 'reactivated_modules' ) ) {
3831
				$titles = array();
3832
				foreach ( explode( ',',  $reactive_state ) as $mod ) {
3833
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
3834
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
3835
					}
3836
				}
3837
				if ( $titles ) {
3838
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following modules have been updated: %l.', 'jetpack' ), $titles );
3839
				}