Drupal Coding Standards Issues | phpcs

Created on 25 January 2023, over 1 year ago
Updated 20 December 2023, 9 months ago

Problem/Motivation

FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/aea/aea.routing.yml
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
6 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
-----------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/aea/aea.libraries.yml
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: ...goyal/Documents/MySites/10.1.x/drupal/modules/contrib/aea/src/Plugin/Field/FieldWidget/AdvancedEntityReferenceAutocompleteWidget.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 1 WARNING AFFECTING 11 LINES
------------------------------------------------------------------------------------------------------------------------------------------
58 | ERROR | [ ] Parameter $entity_type_manager is not described in comment
58 | ERROR | [ ] Parameter $entity_display_repository is not described in comment
58 | ERROR | [ ] Parameter $private_temp_store_factory is not described in comment
76 | ERROR | [x] Multi-line function declarations must define one parameter per line
108 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
109 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
110 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
178 | ERROR | [ ] unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes
| | option.
188 | ERROR | [ ] unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes
| | option.
224 | WARNING | [ ] Only string literals should be passed to t() where possible
319 | ERROR | [x] Expected "string" but found "?string" for function return type
352 | ERROR | [x] Object operator not indented correctly; expected 6 spaces but found 8
355 | ERROR | [ ] unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes
| | option.
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/aea/src/Controller/ClearTempStoreController.php
------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------------------
37 | ERROR | [ ] Parameter $request_stack is not described in comment
61 | ERROR | [ ] Doc comment for parameter $key does not match actual variable name
62 | ERROR | [x] Parameter comment must end with a full stop
72 | WARNING | [x] A comma should follow the last multiline array item. Found: )
81 | WARNING | [x] A comma should follow the last multiline array item. Found: )
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run the following command : phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml /drupal/modules/contrib/aea

Proposed resolution

fix the coding standard issues.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia sahil.goyal

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024