Code Duplication    Length = 9-9 lines in 2 locations

core/Container/Container.php 1 location

@@ 510-518 (lines=9) @@
507
	 * @param string $name
508
	 * @return boolean
509
	 */
510
	public function register_field_name( $name ) {
511
		if ( in_array( $name, $this->registered_field_names ) ) {
512
			Incorrect_Syntax_Exception::raise( 'Field name "' . $name . '" already registered' );
513
			return false;
514
		}
515
516
		$this->registered_field_names[] = $name;
517
		return true;
518
	}
519
520
	/**
521
	 * Remove field name $name from the list of unique field names

core/Field/Group_Field.php 1 location

@@ 246-254 (lines=9) @@
243
	 *
244
	 * @param string $name
245
	 */
246
	public function register_field_name( $name ) {
247
		if ( in_array( $name, $this->registered_field_names ) ) {
248
			Incorrect_Syntax_Exception::raise( 'Field name "' . $name . '" already registered' );
249
			return false;
250
		}
251
252
		$this->registered_field_names[] = $name;
253
		return true;
254
	}
255
}
256