Fix the issues reported by PHP_CodeSniffer

Created on 10 September 2024, 3 months ago
Updated 19 September 2024, 3 months ago

Problem/Motivation

FILE: paragraphs_selection\modules\paragraphs_selection_paragraphs_sets_support\paragraphs_selection_paragraphs_sets_support.info.yml
--------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
--------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: paragraphs_selection\modules\paragraphs_selection_paragraphs_sets_support\paragraphs_selection_paragraphs_sets_support.module
-------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
5 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Serialization\Yaml.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: ...election\modules\paragraphs_selection_paragraphs_sets_support\src\EventSubscriber\ParagraphsSelectionParagraphsSetsSupportUseParagraphsSetSubscriber.php
--------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------------------
10 | ERROR | [x] Doc comment short description must end with a full stop
13 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
17 | ERROR | [x] @inheritdoc found. Did you mean {@inheritdoc}?
19 | ERROR | [ ] Description for the @return value is missing
26 | ERROR | [x] Missing function doc comment
29 | ERROR | [x] Use null coalesce operator instead of ternary operator.
29 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
37 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
50 | ERROR | [x] Expected newline after closing brace
--------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: paragraphs_selection\paragraphs_selection.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run phpcs command to get the drupal coding standard issues.

Proposed resolution

Many of the issues can be fixed by running the phpcbf command. For the remaining ones, we will need to manually address and then commit these changes before pushing them.

📌 Task
Status

Needs review

Version

2.0

Component

Code

Created by

🇺🇸United States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051

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

Comments & Activities

Production build 0.71.5 2024