Code Duplication    Length = 7-8 lines in 2 locations

packages/options/src/Manager.php 2 locations

@@ 44-50 (lines=7) @@
41
	 * @return mixed
42
	 */
43
	public function get_option( $name, $default = false ) {
44
		if ( $this->is_valid( $name, 'non_compact' ) ) {
45
			if ( $this->is_network_option( $name ) ) {
46
				return get_site_option( "jetpack_$name", $default );
47
			}
48
49
			return get_option( "jetpack_$name", $default );
50
		}
51
52
		foreach ( array_keys( $this->grouped_options ) as $group ) {
53
			if ( $this->is_valid( $name, $group ) ) {
@@ 99-106 (lines=8) @@
96
		 * @param mixed $value The new value of the option.
97
		 */
98
		do_action( 'pre_update_jetpack_option_' . $name, $name, $value );
99
		if ( $this->is_valid( $name, 'non_compact' ) ) {
100
			if ( $this->is_network_option( $name ) ) {
101
				return update_site_option( "jetpack_$name", $value );
102
			}
103
104
			return update_option( "jetpack_$name", $value, $autoload );
105
106
		}
107
108
		foreach ( array_keys( $this->grouped_options ) as $group ) {
109
			if ( $this->is_valid( $name, $group ) ) {