Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

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