src/EventSubscriber/StanfordActionsSubscriber.php
syntax error, unexpected 'protected' (T_PROTECTED), expecting variable (T_VARIABLE)
Invalid
Invalid
public function __construct(protected EntityTypeManagerInterface $entityTypeManager, protected EntityFieldManagerInterface $fieldManager) {}
- Exclude checks
Avoid excessively long variable names like $original_parent_deltas. Keep variable name length under 20. Wontfix
Wontfix
$original_parent_deltas = [];
- Read upRead up
- Exclude checks
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
Invalid
$original_parent_deltas[] = $paragraph?->uuid();
- Exclude checks
Expected 1 space before "?"; 0 found Invalid
Invalid
$behaviors = $paragraph?->getAllBehaviorSettings() ?? [];
- Exclude checks
Expected 1 space after "?"; 0 found Invalid
Invalid
$behaviors = $paragraph?->getAllBehaviorSettings() ?? [];
- Exclude checks
Expected 1 space after "?"; 0 found Invalid
Invalid
$original_parent_deltas[] = $paragraph?->uuid();
- Exclude checks