Address code style issues

Created on 11 September 2025, about 1 month ago

Problem/Motivation

phpcs reports

FILE: src/QueueIterator.php
----------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------
13 | ERROR | Missing member variable doc comment (Drupal.Commenting.VariableComment.Missing)
14 | ERROR | Missing member variable doc comment (Drupal.Commenting.VariableComment.Missing)
16 | ERROR | Missing member variable doc comment (Drupal.Commenting.VariableComment.Missing)
17 | ERROR | Missing member variable doc comment (Drupal.Commenting.VariableComment.Missing)
22 | ERROR | Missing parameter type (Drupal.Commenting.FunctionComment.MissingParamType)
24 | ERROR | Missing parameter type (Drupal.Commenting.FunctionComment.MissingParamType)
----------------------------------------------------------------------------------------------
FILE: src/Plugin/migrate/source/Queue.php
------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------
6 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse)
15 | ERROR | [ ] Missing short description in doc comment (Drupal.Commenting.DocComment.MissingShort)
22 | ERROR | [ ] Missing member variable doc comment (Drupal.Commenting.VariableComment.Missing)
23 | ERROR | [ ] Missing member variable doc comment (Drupal.Commenting.VariableComment.Missing)
28 | ERROR | [x] Parameter $migration has null default value, but is not marked as nullable.
| | (SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing)
75 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters (Drupal.Files.LineLength.TooLong)
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: src/EventSubscriber/QueueItemDeleteSubscriber.php
------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------
16 | ERROR | [ ] Missing member variable doc comment (Drupal.Commenting.VariableComment.Missing)
25 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
| | (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
39 | ERROR | [x] Missing function doc comment (Drupal.Commenting.FunctionComment.Missing)
-------------------------------------------------------------------------------------------------------

additionally, phpstan reports,

------ ----------------------------------------------------------------------
Line src/QueueIterator.php
------ ----------------------------------------------------------------------
123 \Drupal calls should be avoided in classes, use dependency injection
instead
πŸͺͺ globalDrupalDependencyInjection.useDependencyInjection
------ ----------------------------------------------------------------------

Remaining tasks

make a PR

πŸ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States BenStallings

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024