Fix the issues reported by phpcs

Created on 21 July 2023, over 1 year ago
Updated 21 September 2023, about 1 year ago

Problem/Motivation

FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/convert_currencies/module/convert_currencies_example_block/src/Plugin/Block/CurrencyBlock.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 51 | ERROR | Expected type hint "CurrencyConverterInterface"; found "FixerConverterService" for $converter
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/convert_currencies/README.md
--------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
--------------------------------------------------------------------------------------------------------
 50 | WARNING | Line exceeds 80 characters; contains 232 characters
 60 | WARNING | Line exceeds 80 characters; contains 233 characters
 61 | WARNING | Line exceeds 80 characters; contains 164 characters
 62 | WARNING | Line exceeds 80 characters; contains 196 characters
 63 | WARNING | Line exceeds 80 characters; contains 100 characters
 64 | WARNING | Line exceeds 80 characters; contains 110 characters
 65 | WARNING | Line exceeds 80 characters; contains 126 characters
--------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/convert_currencies/convert_currencies.install
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] Missing file doc comment
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/convert_currencies/src/Form/CurrencyDeleteForm.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------
 19 | ERROR | Missing short description in doc comment
 88 | ERROR | Description for the @return value is missing
------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/convert_currencies/src/Form/CurrencyConfigForm.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------------
 71 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 72 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 76 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/convert_currencies/src/Form/CurrencyBaseForm.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
 104 | ERROR | [x] No space found before comment text; expected "// $currency->set" but found "//$currency->set"
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/convert_currencies/src/Entity/Currency.php
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------
 38 | ERROR | [x] There must be exactly one newline after the class comment
 61 | ERROR | [ ] Class property $base_rate should use lowerCamel naming without underscores
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/convert_currencies/src/Controller/CurrencyListBuilder.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
 17 | ERROR | Missing short description in doc comment
-------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/convert_currencies/src/FixerConverterService.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 8 LINES
----------------------------------------------------------------------------------------------------------------------------
  11 | ERROR   | [x] Missing class doc comment
  13 | ERROR   | [ ] Missing short description in doc comment
  18 | ERROR   | [ ] Missing short description in doc comment
  23 | ERROR   | [ ] Missing short description in doc comment
  28 | ERROR   | [ ] Missing short description in doc comment
  33 | ERROR   | [ ] Missing short description in doc comment
  90 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 133 | ERROR   | [x] Separate the @param and @return sections by a blank line.
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

Time: 336ms; Memory: 10MB

Steps to reproduce

Please execute this command on the module:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig convert_currencies/

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇵🇭Philippines roberttabigue

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