Code Duplication    Length = 8-8 lines in 2 locations

packages/options/src/Manager.php 1 location

@@ 71-78 (lines=8) @@
68
	 * @param Mixed  $default a default value in case the option is not found.
69
	 * @return Mixed the option value or default if not found.
70
	 */
71
	protected function get_grouped_option( $group, $name, $default ) {
72
		$options = get_option( $this->grouped_options[ $group ] );
73
		if ( is_array( $options ) && isset( $options[ $name ] ) ) {
74
			return $options[ $name ];
75
		}
76
77
		return $default;
78
	}
79
80
	/**
81
	 * Updates the single given option.  Updates jetpack_options or jetpack_$name as appropriate.

class.jetpack-options.php 1 location

@@ 349-356 (lines=8) @@
346
		return $result;
347
	}
348
349
	private static function get_grouped_option( $group, $name, $default ) {
350
		$options = get_option( self::$grouped_options[ $group ] );
351
		if ( is_array( $options ) && isset( $options[ $name ] ) ) {
352
			return $options[ $name ];
353
		}
354
355
		return $default;
356
	}
357
358
	private static function delete_grouped_option( $group, $names ) {
359
		$options = get_option( self::$grouped_options[ $group ], array() );