- Issue created by @kinyein
- ๐จ๐ดColombia kinyein
Hi, I made a merge request to fix the coding standards issue in this module, I hope it can be reviewed soon.
- ๐ต๐ญPhilippines clarkssquared
Hi kinyein,
I checked your MR and applied it in my local, after executing the PHPCS commandd I can still see phpcs issues and warning
โ ewelink git:(1.0.x) curl https://git.drupalcode.org/project/ewelink/-/merge_requests/2.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11186 0 11186 0 0 18209 0 --:--:-- --:--:-- --:--:-- 18337 patching file 'scripts/devices.js' patching file 'scripts/getdevice.js' patching file 'scripts/getdeviceswitch.js' patching file 'scripts/toggledevice.js' patching file 'src/Controller/EWeLink.php' โ ewelink git:(1.0.x) โ .. โ contrib git:(main) โ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml ewelink FILE: .../drupal-issues/drupal-project/web/modules/contrib/ewelink/ewelink.info.yml -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 4 | ERROR | [x] Expected 1 newline at end of file; 2 found -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...s/drupal-issues/drupal-project/web/modules/contrib/ewelink/ewelink.install -------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 1 LINE -------------------------------------------------------------------------------- 1 | ERROR | [x] Expected 1 newline at end of file; 2 found 1 | ERROR | [x] Missing file doc comment -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...rojects/drupal-issues/drupal-project/web/modules/contrib/ewelink/README.md -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES -------------------------------------------------------------------------------- 17 | WARNING | Line exceeds 80 characters; contains 89 characters 39 | WARNING | Line exceeds 80 characters; contains 136 characters 47 | WARNING | Line exceeds 80 characters; contains 85 characters 53 | WARNING | Line exceeds 80 characters; contains 128 characters -------------------------------------------------------------------------------- FILE: ...ts/drupal-issues/drupal-project/web/modules/contrib/ewelink/ewelink.module -------------------------------------------------------------------------------- FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 6 LINES -------------------------------------------------------------------------------- 4 | ERROR | [x] The second line in the file doc comment must be "@file" 4 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements | | hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements | | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* | | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or | | "* Implements hook_foo_BAR_ID_bar() for block templates." 5 | ERROR | [x] There must be no blank lines after the function comment 12 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements | | hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements | | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* | | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or | | "* Implements hook_foo_BAR_ID_bar() for block templates." 13 | ERROR | [x] There must be no blank lines after the function comment 16 | ERROR | [x] Whitespace found at end of line 21 | ERROR | [x] Whitespace found at end of line -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...rupal-project/web/modules/contrib/ewelink/src/Form/EwelinkSettingsForm.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES -------------------------------------------------------------------------------- 62 | WARNING | t() calls should be avoided in classes, use | | \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 63 | WARNING | t() calls should be avoided in classes, use | | \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead -------------------------------------------------------------------------------- FILE: ...sues/drupal-project/web/modules/contrib/ewelink/src/Controller/EWeLink.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES -------------------------------------------------------------------------------- 96 | WARNING | Unused variable $res. 101 | WARNING | There must be no blank line following an inline comment -------------------------------------------------------------------------------- Time: 281ms; Memory: 10MB โ contrib git:(main) โ