Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 507-517 (lines=11) @@
504
		$this->maybe_sync_constants();
505
	}
506
507
	private function maybe_sync_constants() {
508
		$constants = $this->get_all_constants();
509
		if ( empty( $constants ) ) {
510
			return;
511
		}
512
		$constants_check_sum = $this->get_check_sum( $constants );
513
		if ( $constants_check_sum !== (int) get_option( self::$constants_checksum_option_name ) ) {
514
			do_action( 'jetpack_sync_current_constants', $constants );
515
			update_option( self::$constants_checksum_option_name, $constants_check_sum );
516
		}
517
	}
518
519
	private function get_all_constants() {
520
		return array_combine(
@@ 539-549 (lines=11) @@
536
		$this->maybe_sync_callables();
537
	}
538
539
	private function maybe_sync_callables() {
540
		$callables = $this->get_all_callables();
541
		if ( empty( $callables ) ) {
542
			return;
543
		}
544
		$callables_check_sum = $this->get_check_sum( $callables );
545
		if ( $callables_check_sum !== (int) get_option( self::$functions_checksum_option_name ) ) {
546
			do_action( 'jetpack_sync_current_callables', $callables );
547
			update_option( self::$functions_checksum_option_name, $callables_check_sum );
548
		}
549
	}
550
551
	private function get_all_callables() {
552
		return array_combine(