Skip to content

Commit

Permalink
Housekeeping of code to satisfy codeclimate checks, part 24
Browse files Browse the repository at this point in the history
  • Loading branch information
kaise-lafrai committed Apr 2, 2024
1 parent 6b17405 commit 65ef95a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/data_dictionary_widget/src/Fields/FieldOperations.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,12 @@ public static function restoreDictionaryFieldsOnRebuild(&$form, FormStateInterfa
*
* @param array &$form
* The form array to be modified.
* @param $form_state
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current form state object.
* @param int $index
* The index of the dictionary field to reset format options for.
*/
public static function resetAllFormatOptions(array &$form, $form_state, $index) {
public static function resetAllFormatOptions(array &$form, FormStateInterface $form_state, $index) {
$type = $form_state->getValue([
"field_json_metadata",
0,
Expand All @@ -301,9 +301,9 @@ public static function resetAllFormatOptions(array &$form, $form_state, $index)
* This function checks if the field collection associated with dictionary
* fields has a type of "date". If it does, it updates the format options
* and descriptions for the date field within the field collection based
* on the information returned by FieldValues::returnDateInfo().
*
* This function is necessary for when validation triggers an
* on the information returned by FieldValues::returnDateInfo().
*
* This function is necessary for when validation triggers an
* error for an empty format_other field.
*
* @param array &$form
Expand All @@ -328,14 +328,14 @@ public static function resetDateFormatOptions(array &$form) {
* @param array &$form
* The form array to be modified. The field value will be updated
* directly in this array.
* @param $form_state
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current form state object.
* @param int $index
* The index of the field within the form array.
* @param string $field_key
* The key of the field within the form array.
*/
public static function resetFieldValues(array &$form, $form_state, $index, $field_key) {
public static function resetFieldValues(array &$form, FormStateInterface $form_state, $index, $field_key) {
$field_value = $form_state->getValue([
'field_json_metadata',
0,
Expand Down

0 comments on commit 65ef95a

Please sign in to comment.