Code Duplication    Length = 16-16 lines in 2 locations

sync/class.jetpack-sync-options.php 1 location

@@ 45-60 (lines=16) @@
42
		return $updated_num;
43
	}
44
45
	static function get_option( $name, $default = null ) {
46
		global $wpdb;
47
		$value = $wpdb->get_var( 
48
			$wpdb->prepare(
49
				"SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", 
50
				$name
51
			)
52
		);
53
		$value = maybe_unserialize( $value );
54
55
		if ( $value === null && $default !== null ) {
56
			return $default;
57
		}
58
59
		return $value;
60
	}
61
	
62
}

sync/class.jetpack-sync-module-full-sync.php 1 location

@@ 342-357 (lines=16) @@
339
		return $updated_num;
340
	}
341
342
	private function read_option( $name, $default = null ) {
343
		global $wpdb;
344
		$value = $wpdb->get_var( 
345
			$wpdb->prepare(
346
				"SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", 
347
				$name
348
			)
349
		);
350
		$value = maybe_unserialize( $value );
351
352
		if ( $value === null && $default !== null ) {
353
			return $default;
354
		}
355
356
		return $value;
357
	}
358
}
359