Code Duplication    Length = 11-12 lines in 2 locations

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

@@ 273-283 (lines=11) @@
270
		$this->maybe_sync_constants();
271
	}
272
273
	private function maybe_sync_constants() {
274
		$constants = $this->get_all_constants();
275
		if ( empty( $constants ) ) {
276
			return;
277
		}
278
		$constants_check_sum = $this->get_check_sum( $constants );
279
		if ( $constants_check_sum !== get_option( self::$constants_checksum_option_name ) ) {
280
			do_action( 'jetpack_sync_current_constants', $constants );
281
			update_option( self::$constants_checksum_option_name, $constants_check_sum );
282
		}
283
	}
284
285
	private function get_all_constants() {
286
		return array_combine(
@@ 305-316 (lines=12) @@
302
		$this->maybe_sync_callables();
303
	}
304
305
	private function maybe_sync_callables() {
306
		$callables = $this->get_all_callables();
307
		if ( empty( $callables ) ) {
308
			return;
309
		}
310
		$callables_check_sum = $this->get_check_sum( $callables );
311
312
		if ( $callables_check_sum !== get_option( self::$functions_checksum_option_name ) ) {
313
			do_action( 'jetpack_sync_current_callables', $callables  );
314
			update_option( self::$functions_checksum_option_name, $callables_check_sum );
315
		}
316
	}
317
318
	private function get_all_callables() {
319
		return array_combine(