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

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