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

@@ 1058-1074 (lines=17) @@
1055
	 * @param  CMB2_Field $field_group (optional) CMB2_Field object (group parent)
1056
	 * @return array                   Array of field arguments.
1057
	 */
1058
	protected function get_default_args( $field_args, $field_group = null ) {
1059
		if ( $field_group ) {
1060
			$args = array(
1061
				'field_args'  => $field_args,
1062
				'group_field' => $field_group,
1063
			);
1064
		} else {
1065
			$args = array(
1066
				'field_args'  => $field_args,
1067
				'object_type' => $this->object_type(),
1068
				'object_id'   => $this->object_id(),
1069
				'cmb_id'      => $this->cmb_id,
1070
			);
1071
		}
1072
1073
		return $args;
1074
	}
1075
1076
	/**
1077
	 * Get a new field object specific to this CMB2 object.