Fix the errors/warnings reported by PHP_CodeSniffer

Created on 7 July 2023, 12 months ago
Updated 25 January 2024, 5 months ago

Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml shows the following warnings/errors which should be fixed.

FILE: ./README.md
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 43 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./src/Controller/StripeController.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
 156 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 165 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 174 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 183 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
----------------------------------------------------------------------

Time: 188ms; Memory: 6MB
📌 Task
Status

Needs work

Version

1.2

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

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.69.0 2024