Drupal Coding Standards Issues | phpcs

Created on 17 January 2023, almost 2 years ago
Updated 15 May 2024, 6 months ago

Problem/Motivation

Getting following error/warnings

FILE: /var/www/html/modules/contrib/entity_reference_actions/entity_reference_actions.module
--------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
69 | ERROR | [x] There must be one blank line after the last USE statement; 0 found;
69 | ERROR | [x] There should be no white space after an opening "{"
69 | ERROR | [x] There should be no white space before a closing "}"
69 | ERROR | [x] Closing brace must be on a line by itself
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/entity_reference_actions/src/EntityReferenceActionsHandler.php
--------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
--------------------------------------------------------------------------------------------------
29 | WARNING | [x] Unused use statement
250 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
521 | ERROR | [x] Use null coalesce operator instead of ternary operator.
524 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/entity_reference_actions/src/Render/EmptyAttachmentsProcessor.php
-----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------
8 | ERROR | [x] Missing class doc comment
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/entity_reference_actions/src/EventSubscriber/SubRequestAjaxResponseSubscriber.php
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
17 | ERROR | Missing member variable doc comment
---------------------------------------------------------------------------------------------------------------------

Time: 535ms; Memory: 8MB

Steps to reproduce

Run following command

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/entity_reference_actions/

Proposed resolution

Above error/warnings need to be fixed

🐛 Bug report
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇮🇳India samit.310@gmail.com

Live updates comments and jobs are added and updated live.
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.

  • Issue was unassigned.
  • Status changed to RTBC almost 2 years ago
  • Status changed to Closed: won't fix 6 months ago
  • 🇬🇧United Kingdom alexpott 🇪🇺🌍

    This project uses the PHPCS checks provided by core and runs them using gitlab ci - everything is currently green.

Production build 0.71.5 2024