Fix the issues reported by phpcs

Created on 9 February 2023, over 1 year ago
Updated 14 August 2023, 11 months ago

Problem/Motivation

Getting following error/warnings.

FILE: /var/www/html/modules/contrib/owl-carousel/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
15 | WARNING | Line exceeds 80 characters; contains 129 characters
69 | WARNING | Line exceeds 80 characters; contains 251 characters
----------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/owl-carousel/src/Plugin/Field/FieldFormatter/OwlCarouselFieldFormatter.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 13 WARNINGS AFFECTING 14 LINES
---------------------------------------------------------------------------------------------------------------------------
216 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
217 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
218 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
219 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
220 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
221 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
222 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
223 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
224 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
227 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
231 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
235 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
239 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
309 | ERROR | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/owl-carousel/src/OwlCarouselGlobal.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
30 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 1.13 secs; Memory: 6MB

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

Proposed resolution

Above error/warnings need to be fixed.

๐Ÿ“Œ Task
Status

Fixed

Version

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