Code Duplication    Length = 5-5 lines in 4 locations

class.jetpack-options.php 2 locations

@@ 159-163 (lines=5) @@
156
			return empty( $result );
157
		}
158
159
		if ( is_null( $group ) || 'non_compact' === $group ) {
160
			if ( in_array( $name, self::get_option_names( $group ) ) ) {
161
				return true;
162
			}
163
		}
164
165
		foreach ( array_keys( self::$grouped_options ) as $_group ) {
166
			if ( is_null( $group ) || $group === $_group ) {
@@ 166-170 (lines=5) @@
163
		}
164
165
		foreach ( array_keys( self::$grouped_options ) as $_group ) {
166
			if ( is_null( $group ) || $group === $_group ) {
167
				if ( in_array( $name, self::get_option_names( $_group ) ) ) {
168
					return true;
169
				}
170
			}
171
		}
172
173
		return false;

packages/options/src/Manager.php 2 locations

@@ 215-219 (lines=5) @@
212
			return empty( $result );
213
		}
214
215
		if ( is_null( $group ) || 'non_compact' === $group ) {
216
			if ( in_array( $name, $this->get_option_names( $group ), true ) ) {
217
				return true;
218
			}
219
		}
220
221
		foreach ( array_keys( $this->grouped_options ) as $_group ) {
222
			if ( is_null( $group ) || $group === $_group ) {
@@ 222-226 (lines=5) @@
219
		}
220
221
		foreach ( array_keys( $this->grouped_options ) as $_group ) {
222
			if ( is_null( $group ) || $group === $_group ) {
223
				if ( in_array( $name, $this->get_option_names( $_group ), true ) ) {
224
					return true;
225
				}
226
			}
227
		}
228
229
		return false;