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
	protected 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
	 * Return whether the datastore instance is the default one or has been overriden

core/Field/Group_Field.php 1 location

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