Code Duplication    Length = 17-17 lines in 2 locations

includes/CMB2_Base.php 1 location

@@ 180-196 (lines=17) @@
177
	 * @param  CMB2_Field $field_group (optional) CMB2_Field object (group parent)
178
	 * @return array                   Array of field arguments.
179
	 */
180
	protected function get_default_args( $field_args, $field_group = null ) {
181
		if ( $field_group ) {
182
			$args = array(
183
				'field_args'  => $field_args,
184
				'group_field' => $field_group,
185
			);
186
		} else {
187
			$args = array(
188
				'field_args'  => $field_args,
189
				'object_type' => $this->object_type(),
190
				'object_id'   => $this->object_id(),
191
				'cmb_id'      => $this->cmb_id,
192
			);
193
		}
194
195
		return $args;
196
	}
197
198
	/**
199
	 * Get a new field object specific to this CMB2 object.

includes/CMB2.php 1 location

@@ 1005-1021 (lines=17) @@
1002
	 * @param  CMB2_Field $field_group (optional) CMB2_Field object (group parent)
1003
	 * @return array                   Array of field arguments.
1004
	 */
1005
	protected function get_default_args( $field_args, $field_group = null ) {
1006
		if ( $field_group ) {
1007
			$args = array(
1008
				'field_args'  => $field_args,
1009
				'group_field' => $field_group,
1010
			);
1011
		} else {
1012
			$args = array(
1013
				'field_args'  => $field_args,
1014
				'object_type' => $this->object_type(),
1015
				'object_id'   => $this->object_id(),
1016
				'cmb_id'      => $this->cmb_id,
1017
			);
1018
		}
1019
1020
		return $args;
1021
	}
1022
1023
	/**
1024
	 * Get a new field object specific to this CMB2 object.