Problem/Motivation

Getting following warnings.

FILE: /var/www/html/modules/contrib/dbee/dbee.module
-------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
-------------------------------------------------------------------------------------
19 | WARNING | Global constants should not be used, move it to a class or interface
20 | WARNING | Global constants should not be used, move it to a class or interface
21 | WARNING | Global constants should not be used, move it to a class or interface
22 | WARNING | Global constants should not be used, move it to a class or interface
23 | WARNING | Global constants should not be used, move it to a class or interface
24 | WARNING | Global constants should not be used, move it to a class or interface
25 | WARNING | Global constants should not be used, move it to a class or interface
-------------------------------------------------------------------------------------

Time: 3.59 secs; Memory: 12MB

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/dbee/

Proposed resolution

Above warnings need to be fixed.

CommentFileSizeAuthor
#4 interdiff_2-4.txt1 KBsamitk
#4 3339421-4.patch12.39 KBsamitk
#2 3339421-2.patch11.65 KBsamitk

Issue fork dbee-3339421

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

samit.310@gmail.com created an issue. See original summary.

samitk’s picture

Assigned: samitk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new11.65 KB

Above warnings are fixed.

Status: Needs review » Needs work

The last submitted patch, 2: 3339421-2.patch, failed testing. View results

samitk’s picture

Status: Needs work » Needs review
StatusFileSize
new12.39 KB
new1 KB

Fixed failed build issue.

interdiff with #2

Status: Needs review » Needs work

The last submitted patch, 4: 3339421-4.patch, failed testing. View results

Charchil Khandelwal made their first commit to this issue’s fork.

Charchil Khandelwal’s picture

Assigned: Unassigned » Charchil Khandelwal

Charchil Khandelwal’s picture

Assigned: Charchil Khandelwal » Unassigned
jcnventura’s picture

Title: Drupal Coding Standards Issues | phpcs » Global constants should not be used | phpcs

ptmkenny made their first commit to this issue’s fork.

Yashaswi18 made their first commit to this issue’s fork.

jcnventura’s picture

Issue tags: -, -

To be honest, this is an awful coding standard. It would have been a good idea to avoid it a long time ago, but I'd rather disable phpcs on these lines than to do the changes proposed here.

  • jcnventura committed aedd3d8d on 3.x
    Issue #3339421 by samit.310@gmail.com, Charchil Khandelwal, ptmkenny,...
jcnventura’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.