Code Duplication    Length = 10-11 lines in 2 locations

class.jetpack.php 2 locations

@@ 2886-2895 (lines=10) @@
2883
2884
			if ( $send_state_messages && in_array( $module, $active ) ) {
2885
				$module_info = self::get_module( $module );
2886
				if ( ! $module_info['deactivate'] ) {
2887
					$state = in_array( $module, $other_modules ) ? 'reactivated_modules' : 'activated_modules';
2888
					if ( $active_state = self::state( $state ) ) {
2889
						$active_state = explode( ',', $active_state );
2890
					} else {
2891
						$active_state = array();
2892
					}
2893
					$active_state[] = $module;
2894
					self::state( $state, implode( ',', $active_state ) );
2895
				}
2896
				continue;
2897
			}
2898
@@ 2919-2929 (lines=11) @@
2916
2917
			$active[] = $module;
2918
2919
			if ( $send_state_messages ) {
2920
2921
				$state = in_array( $module, $other_modules ) ? 'reactivated_modules' : 'activated_modules';
2922
				if ( $active_state = self::state( $state ) ) {
2923
					$active_state = explode( ',', $active_state );
2924
				} else {
2925
					$active_state = array();
2926
				}
2927
				$active_state[] = $module;
2928
				self::state( $state, implode( ',', $active_state ) );
2929
			}
2930
2931
			self::update_active_modules( $active );
2932