Drupal Coding Standards Issues | phpcs

Created on 9 February 2023, almost 2 years ago

Problem/Motivation

Getting following error/warnings.

FILE: /var/www/html/modules/contrib/owlcarousel2/src/Form/OwlCarousel2RevisionDeleteForm.php
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
35 | ERROR | Class property $OwlCarousel2Storage should use lowerCamel naming without underscores
---------------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/owlcarousel2/src/Form/OwlCarousel2Form.php
-------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------------
231 | WARNING | ImageStyle::load calls should be avoided in classes, use dependency injection instead
364 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
408 | WARNING | View::load calls should be avoided in classes, use dependency injection instead
526 | WARNING | Unused variable $key_form.
-------------------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/owlcarousel2/src/Form/OwlCarousel2RevisionRevertForm.php
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
35 | ERROR | Class property $OwlCarousel2Storage should use lowerCamel naming without underscores
---------------------------------------------------------------------------------------------------

Time: 1.76 secs; Memory: 32MB

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

Proposed resolution

Above error/warnings need to be fixed.

📌 Task
Status

RTBC

Version

2.0

Component

Code

Created by

🇮🇳India samit.310@gmail.com

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