Code Duplication    Length = 9-9 lines in 2 locations

core/Field/Group_Field.php 1 location

@@ 252-260 (lines=9) @@
249
	 * @param string $name
250
	 * @return boolean
251
	 */
252
	public function register_field_name( $name ) {
253
		if ( in_array( $name, $this->registered_field_names ) ) {
254
			Incorrect_Syntax_Exception::raise( 'Field name "' . $name . '" already registered' );
255
			return false;
256
		}
257
258
		$this->registered_field_names[] = $name;
259
		return true;
260
	}
261
}
262

core/Container/Container.php 1 location

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