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

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