Fix the issues reported by phpcs

Created on 4 July 2023, over 1 year ago
Updated 4 October 2023, about 1 year ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/document_preview/document_preview.routing.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
8 | WARNING | Open page callback found, please add a comment before the line
| | why there is no access restriction
--------------------------------------------------------------------------------

FILE: ...html/vb/d_cont/document_preview/templates/document-preview-field.html.twig
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
34 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/document_preview/document_preview.module
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
13 | WARNING | [x] Unused use statement
15 | ERROR | [x] Missing function doc comment
33 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | NULL
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 145ms; Memory: 10MB

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig document_preview/

Remaining tasks

Patch review

📌 Task
Status

RTBC

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

  • Issue created by @urvashi_vora
  • Status changed to RTBC about 1 year ago
  • 🇮🇳India Ashutosh Ahirwal India

    I have reviewed provided patch.
    There are some remaining errors too.

    Used command:- ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/document_preview

    Remaining issues.
    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/document_preview/src/Plugin/Field/FieldFormatter/DocumentPreviewFieldFormatter.php
    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    5 | WARNING | [x] Unused use statement
    7 | WARNING | [x] Unused use statement
    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------

Production build 0.71.5 2024