Fixed issues find by phpcs

Created on 29 April 2024, 7 months ago
Updated 7 May 2024, 7 months ago

Problem/Motivation

There is a files that need to fixed with coding standards.
Here is the command: -
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,css,theme,info,txt,md,yml,twig,js .

FILE: D:\wamp64\www\drupal10\modules\contrib\ics\ics.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
--------------------------------------------------------------------------------


FILE: D:\wamp64\www\drupal10\modules\contrib\ics\js\ics.js
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 1 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
 4 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...mp64\www\drupal10\modules\contrib\ics\modules\ics_media\ics_media.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
--------------------------------------------------------------------------------


FILE: ...ia\src\Plugin\Field\FieldFormatter\ImageComparisonSliderMediaFormatter.php
--------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------
 115 | ERROR | Missing short description in doc comment
 116 | ERROR | Missing parameter comment
 117 | ERROR | Missing parameter comment
 118 | ERROR | Missing parameter comment
 120 | ERROR | Description for the @return value is missing
--------------------------------------------------------------------------------


FILE: D:\wamp64\www\drupal10\modules\contrib\ics\README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 15 | WARNING | Line exceeds 80 characters; contains 119 characters
----------------------------------------------------------------------


FILE: ...wamp64\www\drupal10\modules\contrib\ics\src\ImageComparisonSliderUtils.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 13 | ERROR | Doc comment short description must be on a single line, further
    |       | text should be a separate paragraph
 15 | ERROR | Missing parameter type
--------------------------------------------------------------------------------


FILE: ...rib\ics\src\Plugin\Field\FieldFormatter\ImageComparisonSliderFormatter.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
--------------------------------------------------------------------------------
 184 | ERROR   | Parameter $image_item is not described in comment
 187 | ERROR   | Missing parameter type
 223 | ERROR   | Description for the @return value is missing
 230 | WARNING | \Drupal calls should be avoided in classes, use dependency
     |         | injection instead
 240 | ERROR   | Missing parameter comment
--------------------------------------------------------------------------------

Time: 872ms; Memory: 12MB

Steps to reproduce

Run PHPCS on the "Image Comparison Slider Formatter" module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR .

📌 Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇮🇳India amanbtr72

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