Code Duplication    Length = 17-17 lines in 2 locations

includes/CMB2_Base.php 1 location

@@ 170-186 (lines=17) @@
167
	 * @param  CMB2_Field $field_group (optional) CMB2_Field object (group parent)
168
	 * @return array                   Array of field arguments.
169
	 */
170
	protected function get_default_args( $field_args, $field_group = null ) {
171
		if ( $field_group ) {
172
			$args = array(
173
				'field_args'  => $field_args,
174
				'group_field' => $field_group,
175
			);
176
		} else {
177
			$args = array(
178
				'field_args'  => $field_args,
179
				'object_type' => $this->object_type(),
180
				'object_id'   => $this->object_id(),
181
				'cmb_id'      => $this->cmb_id,
182
			);
183
		}
184
185
		return $args;
186
	}
187
188
	/**
189
	 * Get a new field object specific to this CMB2 object.

includes/CMB2.php 1 location

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