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

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