Fix the issues reported by PHP_CodeSniffer

Created on 28 September 2024, about 2 months ago

Problem/Motivation

FILE: ...commerce_product_taxonomy_filter\commerce_product_taxonomy_filter.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: ...s\commerce_product_taxonomy_filter\commerce_product_taxonomy_filter.module
--------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------
11 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is Drupal\commerce_product\Entity\Product.
63 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
67 | ERROR | [x] Functions must not contain multiple empty lines in a row;
| | found 3 empty lines
68 | ERROR | [x] Whitespace found at end of line
90 | ERROR | [x] Expected 1 space after cast statement; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...mmerce_product_taxonomy_filter\src\Plugin\views\argument\VocabularyVid.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is Drupal\taxonomy\VocabularyStorageInterface.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...commerce_product_taxonomy_filter\src\Plugin\views\argument_default\Tid.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
12 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is
| | Drupal\views\Plugin\views\display\DisplayPluginBase.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...merce_product_taxonomy_filter\src\Plugin\views\argument_validator\Term.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is
| | Drupal\views\Plugin\views\display\DisplayPluginBase.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...mmerce_product_taxonomy_filter\src\Plugin\views\field\TaxonomyIndexTid.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is
| | Drupal\views\Plugin\views\display\DisplayPluginBase.
175 | ERROR | [ ] Public method name "TaxonomyIndexTid::render_item" is not in
| | lowerCamel format
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...merce_product_taxonomy_filter\src\Plugin\views\filter\TaxonomyIndexTid.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
12 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is
| | Drupal\views\Plugin\views\display\DisplayPluginBase.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ..._taxonomy_filter\src\Plugin\views\relationship\CommerceProductTermData.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is
| | Drupal\views\Plugin\views\display\DisplayPluginBase.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS 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 work

Version

1.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

Merge Requests

Comments & Activities

Production build 0.71.5 2024