SU-SWS/stanford_fields

View on GitHub

Showing 67 of 109 total issues

File select-list.tsx has 263 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import styled from "styled-components";
import {useSelect, SelectOptionDefinition, SelectProvider, SelectValue} from '@mui/base/useSelect';
import {useOption} from '@mui/base/useOption';
import {ChevronDownIcon} from "@heroicons/react/20/solid";
import {useEffect, useState, useRef, useId, useLayoutEffect, RefObject, ReactNode} from "preact/compat";
Severity: Minor
Found in js/lib/components/select-list.tsx - About 2 hrs to fix

    Method formElement has 58 lines of code (exceeds 40 allowed). Consider refactoring.
    Open

    public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state): array {
    $element = parent::formElement($items, $delta, $element, $form, $form_state);
    $options = $this->getOptions($items->getEntity());
    $selected_items = $this->getSelectedOptions($items);
     
     
    Severity: Major
    Found in src/Plugin/Field/FieldWidget/TaxonomyLabelHierarchyWidget.php - About 1 hr to fix

      Expected 1 space before "="; 0 found
      Open

      declare(strict_types=1);

      Expected 1 space after "="; 0 found
      Open

      declare(strict_types=1);

      Unused use statement
      Open

      use Drupal\views\Attribute\ViewsDisplay;

      Line indented incorrectly; expected 0 spaces, found 2
      Open

      id: 'entity_title_heading',

      Perl-style comments are not allowed; use "// Comment" instead
      Open

      #[FieldWidget(

      Perl-style comments are not allowed; use "// Comment" instead
      Open

      #[FieldWidget(

      Missing class doc comment
      Open

      final class TaxonomyLabelHierarchyWidget extends OptionsWidgetBase {

      Missing class doc comment
      Open

      class RelativeLinkFieldItemConstraint extends SymfonyConstraint {

      Expected 1 space before "="; 0 found
      Open

      declare(strict_types=1);

      Unused use statement
      Open

      use Drupal\better_exposed_filters\BetterExposedFiltersHelper;

      Doc comment short description must end with a full stop
      Open

      * {@inheritDoc}

      Expected 1 space after "="; 0 found
      Open

      declare(strict_types=1);

      Doc comment short description must end with a full stop
      Open

      * {@inheritDoc}

      Expected 1 space after "|"; 0 found
      Open

      public function getLinkDefaults(int|string $nid): array {

      Doc comment short description must start with a capital letter
      Open

      * {@inheritDoc}

      Unused use statement
      Open

      use Drupal\Core\Validation\Attribute\Constraint;

      Doc comment short description must start with a capital letter
      Open

      * {@inheritDoc}

      Expected 1 space before "?"; 0 found
      Open

      $link_uri = $value->get(0)?->get('uri')?->getString();
      Severity
      Category
      Status
      Source
      Language