Code Duplication    Length = 11-12 lines in 2 locations

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

@@ 301-311 (lines=11) @@
298
		$this->maybe_sync_constants();
299
	}
300
301
	private function maybe_sync_constants() {
302
		$constants = $this->get_all_constants();
303
		if ( empty( $constants ) ) {
304
			return;
305
		}
306
		$constants_check_sum = $this->get_check_sum( $constants );
307
		if ( $constants_check_sum !== get_option( self::$constants_checksum_option_name ) ) {
308
			do_action( 'jetpack_sync_current_constants', $constants );
309
			update_option( self::$constants_checksum_option_name, $constants_check_sum );
310
		}
311
	}
312
313
	private function get_all_constants() {
314
		return array_combine(
@@ 333-344 (lines=12) @@
330
		$this->maybe_sync_callables();
331
	}
332
333
	private function maybe_sync_callables() {
334
		$callables = $this->get_all_callables();
335
		if ( empty( $callables ) ) {
336
			return;
337
		}
338
		$callables_check_sum = $this->get_check_sum( $callables );
339
340
		if ( $callables_check_sum !== get_option( self::$functions_checksum_option_name ) ) {
341
			do_action( 'jetpack_sync_current_callables', $callables );
342
			update_option( self::$functions_checksum_option_name, $callables_check_sum );
343
		}
344
	}
345
346
	private function get_all_callables() {
347
		return array_combine(