Fix the issues reported by phpcs

Created on 8 July 2024, 5 months ago

Problem/Motivation

command -:
vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig modules/contrib/responsive_image_field/

FILE: /var/www/html/drupal-contri-d10/modules/contrib/responsive_image_field/src/Plugin/Field/FieldWidget/ResponsiveImageFieldWidget.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 10 LINES
----------------------------------------------------------------------------------------------------------------------------------------
  76 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
  77 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
  78 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
  79 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
  98 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
  99 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
 100 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
 101 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
 102 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
 152 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/drupal-contri-d10/modules/contrib/responsive_image_field/src/Plugin/Field/FieldFormatter/ResponsiveImageFieldDefaultFormatter.php
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------
 71 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
 72 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
 73 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
 74 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 6
-----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/drupal-contri-d10/modules/contrib/responsive_image_field/css/responsive_image_field.css
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 1 | WARNING | File appears to be minified and cannot be processed
-----------------------------------------------------------------------------------------------------------


FILE: /var/www/html/drupal-contri-d10/modules/contrib/responsive_image_field/README.md
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------
 14 | WARNING | Line exceeds 80 characters; contains 176 characters
 16 | WARNING | Line exceeds 80 characters; contains 175 characters
--------------------------------------------------------------------------------------


FILE: /var/www/html/drupal-contri-d10/modules/contrib/responsive_image_field/responsive_image_field.module
----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
 35 | WARNING | Line exceeds 80 characters; contains 94 characters
----------------------------------------------------------------------------------------------------------


FILE: /var/www/html/drupal-contri-d10/modules/contrib/responsive_image_field/responsive_image_field.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
 1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
 1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------

Time: 184ms; Memory: 10MB

Steps to reproduce

Run PHPCS on Config Pages module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR.

๐Ÿ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia bhaveshdas

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024