SU-SWS/stanford_actions

View on GitHub
src/EventSubscriber/StanfordActionsSubscriber.php

Summary

Maintainability
A
0 mins
Test Coverage
A
96%

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

  public function __construct(protected EntityTypeManagerInterface $entityTypeManager, protected EntityFieldManagerInterface $fieldManager) {}

Avoid excessively long variable names like $original_parent_deltas. Keep variable name length under 20.
Wontfix

    $original_parent_deltas = [];

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Expected 1 space before "?"; 0 found
Invalid

      $original_parent_deltas[] = $paragraph?->uuid();

Expected 1 space before "?"; 0 found
Invalid

      $behaviors = $paragraph?->getAllBehaviorSettings() ?? [];

Expected 1 space after "?"; 0 found
Invalid

      $behaviors = $paragraph?->getAllBehaviorSettings() ?? [];

Expected 1 space after "?"; 0 found
Invalid

      $original_parent_deltas[] = $paragraph?->uuid();

There are no issues that match your filters.

Category
Status