Code Duplication    Length = 9-9 lines in 2 locations

core/Field/Group_Field.php 1 location

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

core/Container/Container.php 1 location

@@ 566-574 (lines=9) @@
563
	 * @param string $name
564
	 * @return boolean
565
	 */
566
	protected function register_field_name( $name ) {
567
		if ( in_array( $name, $this->registered_field_names ) ) {
568
			Incorrect_Syntax_Exception::raise( 'Field name "' . $name . '" already registered' );
569
			return false;
570
		}
571
572
		$this->registered_field_names[] = $name;
573
		return true;
574
	}
575
576
	/**
577
	 * Return whether the datastore instance is the default one or has been overriden