Code Duplication    Length = 7-7 lines in 2 locations

packages/options/src/Manager.php 1 location

@@ 182-188 (lines=7) @@
179
		$options = get_option( $this->grouped_options[ $group ], array() );
180
181
		$to_delete = array_intersect( $names, $this->get_option_names( $group ), array_keys( $options ) );
182
		if ( $to_delete ) {
183
			foreach ( $to_delete as $name ) {
184
				unset( $options[ $name ] );
185
			}
186
187
			return update_option( $this->grouped_options[ $group ], $options );
188
		}
189
190
		return true;
191
	}

class.jetpack-options.php 1 location

@@ 362-368 (lines=7) @@
359
		$options = get_option( self::$grouped_options[ $group ], array() );
360
361
		$to_delete = array_intersect( $names, self::get_option_names( $group ), array_keys( $options ) );
362
		if ( $to_delete ) {
363
			foreach ( $to_delete as $name ) {
364
				unset( $options[ $name ] );
365
			}
366
367
			return update_option( self::$grouped_options[ $group ], $options );
368
		}
369
370
		return true;
371
	}