Code Duplication    Length = 7-8 lines in 2 locations

class.jetpack-options.php 2 locations

@@ 199-205 (lines=7) @@
196
	 * @return mixed
197
	 */
198
	public static function get_option( $name, $default = false ) {
199
		if ( self::is_valid( $name, 'non_compact' ) ) {
200
			if ( self::is_network_option( $name ) ) {
201
				return get_site_option( "jetpack_$name", $default );
202
			}
203
204
			return get_option( "jetpack_$name", $default );
205
		}
206
207
		foreach ( array_keys( self::$grouped_options ) as $group ) {
208
			if ( self::is_valid( $name, $group ) ) {
@@ 276-283 (lines=8) @@
273
		 * @param mixed $value The new value of the option.
274
		 */
275
		do_action( 'pre_update_jetpack_option_' . $name, $name, $value );
276
		if ( self::is_valid( $name, 'non_compact' ) ) {
277
			if ( self::is_network_option( $name ) ) {
278
				return update_site_option( "jetpack_$name", $value );
279
			}
280
281
			return update_option( "jetpack_$name", $value, $autoload );
282
283
		}
284
285
		foreach ( array_keys( self::$grouped_options ) as $group ) {
286
			if ( self::is_valid( $name, $group ) ) {