Code Duplication    Length = 5-5 lines in 4 locations

class.jetpack-options.php 2 locations

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