Code Duplication    Length = 11-12 lines in 2 locations

sync/class.jetpack-sync-client.php 2 locations

@@ 318-328 (lines=11) @@
315
		$this->maybe_sync_constants();
316
	}
317
318
	private function maybe_sync_constants() {
319
		$constants = $this->get_all_constants();
320
		if ( empty( $constants ) ) {
321
			return;
322
		}
323
		$constants_check_sum = $this->get_check_sum( $constants );
324
		if ( $constants_check_sum !== get_option( self::$constants_checksum_option_name ) ) {
325
			do_action( 'jetpack_sync_current_constants', $constants );
326
			update_option( self::$constants_checksum_option_name, $constants_check_sum );
327
		}
328
	}
329
330
	private function get_all_constants() {
331
		return array_combine(
@@ 350-361 (lines=12) @@
347
		$this->maybe_sync_callables();
348
	}
349
350
	private function maybe_sync_callables() {
351
		$callables = $this->get_all_callables();
352
		if ( empty( $callables ) ) {
353
			return;
354
		}
355
		$callables_check_sum = $this->get_check_sum( $callables );
356
357
		if ( $callables_check_sum !== get_option( self::$functions_checksum_option_name ) ) {
358
			do_action( 'jetpack_sync_current_callables', $callables );
359
			update_option( self::$functions_checksum_option_name, $callables_check_sum );
360
		}
361
	}
362
363
	private function get_all_callables() {
364
		return array_combine(