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(
@@ 300-311 (lines=12) @@
297
		return null;
298
	}
299
300
	private function maybe_sync_callables() {
301
		$callables           = $this->get_all_callables();
302
		if ( empty( $callables ) ) {
303
			return;
304
		}
305
		$callables_check_sum = $this->get_check_sum( $callables );
306
307
		if ( $callables_check_sum !== get_option( self::$functions_checksum_option_name ) ) {
308
			do_action( 'jetpack_sync_current_callables', $callables  );
309
			update_option( self::$functions_checksum_option_name, $callables_check_sum );
310
		}
311
	}
312
313
	private function get_all_callables() {
314
		return array_combine(