Code Duplication    Length = 17-17 lines in 2 locations

includes/CMB2_Base.php 1 location

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

includes/CMB2.php 1 location

@@ 973-989 (lines=17) @@
970
	 * @param  CMB2_Field $field_group (optional) CMB2_Field object (group parent)
971
	 * @return array                   Array of field arguments.
972
	 */
973
	protected function get_default_args( $field_args, $field_group = null ) {
974
		if ( $field_group ) {
975
			$args = array(
976
				'field_args'  => $field_args,
977
				'group_field' => $field_group,
978
			);
979
		} else {
980
			$args = array(
981
				'field_args'  => $field_args,
982
				'object_type' => $this->object_type(),
983
				'object_id'   => $this->object_id(),
984
				'cmb_id'      => $this->cmb_id,
985
			);
986
		}
987
988
		return $args;
989
	}
990
991
	/**
992
	 * Get a new field object specific to this CMB2 object.