Fix the issues reported by phpcs

Created on 10 April 2023, about 1 year ago
Updated 8 March 2024, 4 months ago

Problem/Motivation

FILE: /querybuilder/src/Form/OptimiseDatabaseForm.php
--------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------------------------
  6 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
  9 | ERROR | [x] Missing class doc comment
 31 | ERROR | [x] Short array syntax must be used to define arrays
 51 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------

FILE: /querybuilder/querybuilder.links.menu.yml
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
 18 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------

FILE: /querybuilder/querybuilder.permissions.yml
---------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
 36 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------

FILE: /querybuilder/README.txt
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
 42 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------

FILE: /querybuilder/config/install/querybuilder.settings.yml
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------

FILE: /querybuilder/querybuilder.routing.yml
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
 21 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------

Steps to reproduce

phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml querybuilder

Proposed resolution

Fix the errors.

๐Ÿ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Binoli Lalani Gujarat

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

  • Issue created by @Binoli Lalani
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Binoli Lalani Gujarat

    Hello,

    Please review MR.

    Thank you!

  • Status changed to Needs work 4 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Ashutosh Ahirwal India

    Hi Provided MR resolved issue but still there are some issue found.
    Moving to need work to get notice.
    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/querybuilder

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

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/querybuilder/src/Form/OptimiseDatabaseForm.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------------------
    35 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    -----------------------------------------------------------------------------------------------------------------------------------------

    Time: 94ms; Memory: 10MB

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Mohd Sahzad

    Mohd Sahzad โ†’ made their first commit to this issueโ€™s fork.

  • Status changed to Needs review 4 months ago
Production build 0.69.0 2024