Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 4227-4231 (lines=5) @@
4224
4225
			if ( $active_state ) {
4226
				$titles = array();
4227
				foreach ( $active_state as $mod ) {
4228
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4229
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4230
					}
4231
				}
4232
				if ( $titles ) {
4233
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following new modules have been activated: %l.', 'jetpack' ), $titles );
4234
				}
@@ 4239-4243 (lines=5) @@
4236
4237
			if ( $reactive_state = Jetpack::state( 'reactivated_modules' ) ) {
4238
				$titles = array();
4239
				foreach ( explode( ',',  $reactive_state ) as $mod ) {
4240
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4241
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4242
					}
4243
				}
4244
				if ( $titles ) {
4245
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following modules have been updated: %l.', 'jetpack' ), $titles );
4246
				}