Code Duplication    Length = 11-12 lines in 2 locations

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

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