Fix the issues reported by phpcs

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

Problem/Motivation

FILE: /var/www/html/vb/d_cont/livefilter/livefilter.module
-----------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
3 | ERROR | [x] Doc comment short description must be on the first line
3 | ERROR | [x] Doc comment short description must end with a full stop
6 | ERROR | [x] Missing function doc comment
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/livefilter/css/livefilter.css
-----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------
2 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/livefilter/src/Plugin/Block/LiveFilterBlock.php
-----------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

Time: 67ms; 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 livefilter/

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
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 1 year ago
    1 pass
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Ashutosh Ahirwal India

    I applied provided patch and it get applied cleanly but still there are some error found.
    Providing updated patch.
    Remaining issue from previously patch.

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/livefilter/livefilter.info.yml
    -------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------
    1 | WARNING | "Description" property is missing in the info.yml file
    -------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/livefilter/js/livefilter.js
    ----------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------
    16 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    27 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
    ----------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------

    Time: 98ms; Memory: 10MB

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia mrinalini9 New Delhi

    Hi,

    I have reviewed patch #2, looks good to me. It applied cleanly and fixed all the phpcs issues as mentioned above.
    So, for me, it is RTBC.

    Thanks!

  • Status changed to RTBC about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia aayushDrupal

    Hi,

    Your patch #2 has been successfully applied and has resolved all the PHPCS issues. Please refer to the attached screenshot for reference.

    Moving to RTBC.
    Thank you.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gautam_105@

    Gautam_105@ โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gautam_105@

    Hi urvashi_vora,
    i have fixed all phpcs issue and created MR for the same. see the screenshot well.

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 1 year ago
    1 pass
  • @gautam_105 opened merge request.
Production build 0.71.5 2024