Fix the issues reported by phpcs

Created on 6 July 2023, over 1 year ago
Updated 19 July 2023, over 1 year ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/image_sizes_extras/image_sizes_extras.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
7 | WARNING | All dependencies must be prefixed with the project name, for
| | example "drupal:"
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/image_sizes_extras/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
6 | WARNING | Line exceeds 80 characters; contains 288 characters
8 | WARNING | Line exceeds 80 characters; contains 112 characters
11 | WARNING | Line exceeds 80 characters; contains 160 characters
----------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/image_sizes_extras/image_sizes_extras.module
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
31 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements
| | hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or
| | "* Implements hook_foo_BAR_ID_bar() for block templates."
32 | WARNING | [x] 'TODO: Add fallback image dimensions for photoswipe etc.'
| | should match the format '@todo Fix problem X here.'
32 | ERROR | [ ] Doc comment short description must be on a single line,
| | further text should be a separate paragraph
39 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
49 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | 'image_sizes_extras/core'
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/image_sizes_extras/css/image-sizes-extras.css
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
15 | ERROR | Style definitions must end with a semicolon
---------------------------------------------------------------------------

FILE: ...sizes_extras/src/Plugin/Field/FieldFormatter/ImageSizesExtrasFormatter.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
6 | WARNING | [x] Unused use statement
8 | WARNING | [x] Unused use statement
10 | WARNING | [x] Unused use statement
48 | ERROR | [x] Expected 1 blank line after function; 0 found
49 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 96ms; Memory: 10MB

Steps to reproduce

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig image_sizes_extras/

Remaining tasks

Patch review

📌 Task
Status

Fixed

Version

1.0

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