Skip to content
Snippets Groups Projects

Fixed phpcs issues.

8 unresolved threads

Closes #3353268

Merge request reports

Members who can merge are allowed to add commits.
Approval is optional
Ready to merge by members who can write to the target branch.
  • 1 commit will be added to 8.x-1.x.
  • Source branch will not be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
10 10 * This Class modifies the autocomplete widget such that even though a field storage is multiple
11 11 * if a field_config_cardinality of 1 is specified the single element is used.
12 12 *
13 * Class EntityReferenceAutocompleteWidget
13 * Class EntityReferenceAutocompleteWidget.
  • 6 6 use Drupal\Core\Form\FormStateInterface;
    7 7 use Drupal\media_library\Plugin\Field\FieldWidget\MediaLibraryWidget;
    8 8
    9 /**
    10 * This Class is for maintaining cardinality of media libray widget.
    11 *
    12 * Class CardinalityMediaLibraryWidget.
  • 27 28 * Implements hook_form_alter().
    28 29 *
    29 30 * @param $form
    30 * @param FormStateInterface $form_state
    31 * @param \Drupal\Core\Form\FormStateInterface $form_state
    31 32 * @param $form_id
  • 155 156 }
    156 157
    157 158 /**
    158 159 * Implements entity_builder.
  • 155 156 }
    156 157
    157 158 /**
    158 159 * Implements entity_builder.
    159 160 * see here: https://www.drupal.org/node/2334447 and https://www.drupal.org/node/2326151
    160 161 *
    161 162 * @param $entity_type
    162 163 * @param \Drupal\field\Entity\FieldConfig $config
    163 164 * @param $form
    164 * @param FormStateInterface $form_state
    165 * @param \Drupal\Core\Form\FormStateInterface $form_state
  • 188 189 }
    189 190
    190 191 /**
    191 * Implements hook_form_alter().
    192 * Implements hook_form_FORM_ID_alter().
  • 224 220 }
    225 221
    226 222 /**
    227 * Implements hook_preprocess_field_multiple_value_form()
    223 * Implements hook_preprocess_field_multiple_value_form().
  • 252 248 $items = [];
    253 249 $variables['button'] = [];
    254 250 foreach (Element::children($element) as $key) {
    255 if (is_integer($key)) {
    251 if (is_int($key)) {
    • Comment on lines -255 to +251

      is_integer() is an alias for is_int(). Either one or the other can be used in PHP 8.2 (which means the alias has not been yet deprecated).

      Despite it is reported as error from PHP_CodeSniffer, PHP allows to use is_integer() even if that is an alias for is_int().

    • Please register or sign in to reply
  • shruu_rao added 1 commit

    added 1 commit

    • ed15f20e - Addressed some of the above comments

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading