SU-SWS/stanford_fields

View on GitHub

Showing 51 of 94 total issues

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

    Unused use statement
    Open

    use Drupal\Core\Block\Attribute\Block;

    Doc comment short description must end with a full stop
    Open

       * {@inheritDoc}

    Expected 1 space before "="; 0 found
    Open

    declare(strict_types=1);

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

    #[FieldFormatter(

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

    #[FieldWidget(

    Line indented incorrectly; expected 0 spaces, found 2
    Open

      id: 'datetime_year_only',

    Expected 1 space after "?"; 0 found
    Open

        $link_uri = $value->get(0)?->get('uri')?->getString();

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

    #[ViewsDisplay(

    Missing class doc comment
    Open

    class EntityTitleHeading extends FormatterBase implements ContainerFactoryPluginInterface {

    Missing class doc comment
    Open

    class DateYearOnlyWidget extends DateTimeDatelistWidget {

    Expected 1 space after "="; 0 found
    Open

    declare(strict_types=1);

    Line indented incorrectly; expected 0 spaces, found 2
    Open

      id: 'taxonomy_label_hierarchy',

    Expected 1 space before "?"; 0 found
    Open

        $link_uri = $value->get(0)?->get('uri')?->getString();

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

    #[FieldWidget(

    Doc comment short description must end with a full stop
    Open

       * {@inheritDoc}

    Doc comment short description must start with a capital letter
    Open

       * {@inheritDoc}

    Missing class doc comment
    Open

    final class TaxonomyLabelHierarchyWidget extends OptionsWidgetBase {

    Missing class doc comment
    Open

    class LocalistUrlWidget extends LinkWidget {

    Doc comment short description must end with a full stop
    Open

       * {@inheritDoc}
    Severity
    Category
    Status
    Source
    Language