SU-SWS/stanford_profile_helper

View on GitHub
src/Plugin/Field/FieldWidget/SamlRoleMappingWidget.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Method formElement has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

  public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {

    // If the form is newly built, the form state storage will be null. If the
    // form is being rebuilt from an ajax, the storage will be some type of
    // array.
Severity: Minor
Found in src/Plugin/Field/FieldWidget/SamlRoleMappingWidget.php - About 1 hr to fix

    Variable $role_id is undefined.
    Invalid

        [$role_id, $comparison] = explode(':', $role_mapping_string, 2);

    Variable $comparison is undefined.
    Invalid

        [$role_id, $comparison] = explode(':', $role_mapping_string, 2);

    Variable $role_id is undefined.
    Invalid

          ['#markup' => $role ? $role->label() : $this->t('Broken: @id', ['@id' => $role_id])],

    Variable $comparison is undefined.
    Invalid

        $exploded_comparison = explode(',', $comparison, 3);

    Variable $role_id is undefined.
    Invalid

          ->load($role_id);

    There are no issues that match your filters.

    Category
    Status