SU-SWS/stanford_fields

View on GitHub

Showing 68 of 110 total issues

Expected 1 space before "="; 0 found
Open

declare(strict_types=1);

Expected 1 space before "="; 0 found
Open

declare(strict_types=1);

Expected 1 space before "|"; 0 found
Open

public function getTableOfContents(int|string $bid, int $depth_limit, array $exclude = [], bool $truncate = TRUE): array {

Missing class doc comment
Open

class DateYearOnlyWidget extends DateTimeDatelistWidget {

Doc comment short description must end with a full stop
Open

* {@inheritDoc}

Expected 1 space before "|"; 0 found
Open

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

Unused use statement
Open

use Drupal\Core\Field\Attribute\FieldFormatter;

Missing class doc comment
Open

class EntityTitleHeading extends FormatterBase implements ContainerFactoryPluginInterface {

Expected 1 space before "="; 0 found
Open

declare(strict_types=1);

Expected 1 space after "|"; 0 found
Open

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

Doc comment short description must end with a full stop
Open

* {@inheritDoc}

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

#[Constraint(

Line indented incorrectly; expected 0 spaces, found 2
Open

id: 'entity_title_heading',

Doc comment short description must start with a capital letter
Open

* {@inheritDoc}

Expected 1 space before "="; 0 found
Open

declare(strict_types=1);

Unused use statement
Open

use Drupal\views\Attribute\ViewsDisplay;

Expected 1 space after "|"; 0 found
Open

public function getTableOfContents(int|string $bid, int $depth_limit, array $exclude = [], bool $truncate = TRUE): array {

Function formElement has a Cognitive Complexity of 11 (exceeds 10 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: Minor
Found in src/Plugin/Field/FieldWidget/TaxonomyLabelHierarchyWidget.php - About 25 mins to fix

syntax error, unexpected ','
Open

id: 'relative_internal_link',

syntax error, unexpected 'protected' (T_PROTECTED), expecting variable (T_VARIABLE)
Open

public function __construct(protected BookManagerInterface $bookManager, protected ConfigFactoryInterface $configFactory, protected EventDispatcherInterface $eventDispatcher, protected EntityTypeManagerInterface $entityTypeManager) {}
Severity: Critical
Found in src/Service/StanfordFieldsBookManager.php by phan
Severity
Category
Status
Source
Language