Code Duplication    Length = 10-11 lines in 2 locations

class.jetpack.php 2 locations

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