Code Duplication    Length = 7-7 lines in 2 locations

class.jetpack-options.php 1 location

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

packages/options/src/Manager.php 1 location

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