Fix the issues reported by phpcs

Created on 27 September 2022, over 2 years ago
Updated 5 May 2023, almost 2 years ago

Problem/Motivation

FILE: /home/drupal/d9-open/extra_field_plus/extra_field_plus.module
---------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------
 289 | WARNING | [x] A comma should follow the last multiline array item. Found: 'layout_builder_update_block'
 309 | WARNING | [ ] Line exceeds 80 characters; contains 92 characters
 357 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 365 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
---------------------------------------------------------------------------------------------------------------

FILE: ...l/d9-open/extra_field_plus/modules/extra_field_plus_example/tests/src/Functional/ExtraFieldPluginPlusDeprecatedExampleFunctionalTest.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 4 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
  88 | WARNING | Line exceeds 80 characters; contains 82 characters
  88 | ERROR   | Comment indentation error, expected only 1 spaces
  92 | ERROR   | Comment indentation error, expected only 1 spaces
  97 | ERROR   | Comment indentation error, expected only 1 spaces
  98 | WARNING | Line exceeds 80 characters; contains 253 characters
  99 | WARNING | Line exceeds 80 characters; contains 254 characters
 100 | WARNING | Line exceeds 80 characters; contains 262 characters
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: ...ld_plus/modules/extra_field_plus_example/tests/src/FunctionalJavascript/ExtraFieldPluginPlusExampleNodeLabelFunctionalJavascriptTest.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
 215 | WARNING | Unused variable $driver.
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: ...odules/extra_field_plus_example/tests/src/FunctionalJavascript/ExtraFieldPluginPlusExampleNodeLabelFormattedFunctionalJavascriptTest.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
  86 | WARNING | Unused variable $driver.
 120 | WARNING | Unused variable $page.
 121 | WARNING | Unused variable $driver.
 218 | WARNING | Unused variable $driver.
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: ...i/drupal/d9-open/extra_field_plus/modules/extra_field_plus_example/src/Plugin/ExtraField/Display/DeprecatedExampleNodeLabelFormatted.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
 93 | WARNING | #options values usually have to run through t() for translation
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /home/drupal/d9-open/extra_field_plus/modules/extra_field_plus_example/src/Plugin/ExtraField/Display/ExampleNodeLabel.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
 67 | WARNING | #options values usually have to run through t() for translation
--------------------------------------------------------------------------------------------------------------------------------------

FILE: ...ome/drupal/d9-open/extra_field_plus/modules/extra_field_plus_example/src/Plugin/ExtraField/Display/DeprecatedExampleNodeLabel.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
 79 | WARNING | #options values usually have to run through t() for translation
----------------------------------------------------------------------------------------------------------------------------------------------


FILE: ...home/drupal/d9-open/extra_field_plus/modules/extra_field_plus_example/src/Plugin/ExtraField/Display/ExampleNodeLabelFormatted.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
 81 | WARNING | #options values usually have to run through t() for translation
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /home/drupal/d9-open/extra_field_plus/composer.json
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 27 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------

FILE: /home/drupal/d9-open/extra_field_plus/UPGRADE.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
 17 | WARNING | Line exceeds 80 characters; contains 120 characters
 18 | WARNING | Line exceeds 80 characters; contains 87 characters
 61 | WARNING | Line exceeds 80 characters; contains 132 characters
----------------------------------------------------------------------

Steps to reproduce

phpcs  --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig  .
📌 Task
Status

Needs work

Version

3.0

Component

Documentation

Created by

🇮🇳India Dharti Patel

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.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany Grevil

    Please provide the patch as an MR, since a few changes got implemented in the meantime ad compatibility isn't given through a patch file.

    Thanks! :)

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.

  • Status changed to Needs review almost 2 years ago
  • 🇨🇦Canada imustakim Canada

    Issue summary updated.
    Please review.

  • Status changed to Needs work almost 2 years ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    See also comment #12.

    Please provide the patch as an MR, since a few changes got implemented in the meantime ad compatibility isn't given through a patch file.

Production build 0.71.5 2024