Code Duplication    Length = 9-9 lines in 2 locations

core/Container/Container.php 1 location

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

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