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

FILE: C:\Users\SI-001\Downloads\guidelines\src\Controller\GuidelineJsonController.php
-------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------
22 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
36 | ERROR | [x] list(...) is forbidden, use [...] instead.
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------

FILE: C:\Users\SI-001\Downloads\guidelines\src\Plugin\Field\FieldWidget\GuidelineFieldTargetWidget.php
------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------
113 | ERROR | [x] list(...) is forbidden, use [...] instead.
------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------

Time: 650ms; Memory: 10MB

Issue fork guidelines-3296028

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Rakhi Soni created an issue. See original summary.

rakhi soni’s picture

Assigned: rakhi soni » Unassigned
Status: Active » Needs review
StatusFileSize
new1.71 KB

Kindly review patch,,

kunal_sahu made their first commit to this issue’s fork.

kunal_sahu’s picture

Assigned: Unassigned » kunal_sahu
Status: Needs review » Active

Hey @rakhi-soni , i reviewed your patch. I found some error which i am listing it below. I will also work to fix the issue.

kunal@kunal-HP-Laptop-15-db0xxx:/var/www/html/stree$ vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig modules/contrib/guidelines-3296028/

FILE: ...ules/contrib/guidelines-3296028/src/Controller/GuidelineJsonController.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
 22 | ERROR   | [ ] Parameter tags must be grouped together in a doc comment
 36 | ERROR   | [x] list(...) is forbidden, use [...] instead.
 36 | WARNING | [ ] Unused variable $e.
 38 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
    |         |     injection instead
 50 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
    |         |     injection instead
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...elines-3296028/src/Plugin/Field/FieldWidget/GuidelineFieldTargetWidget.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 113 | ERROR | [x] list(...) is forbidden, use [...] instead.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: /var/www/html/stree/modules/contrib/guidelines-3296028/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
 5 | WARNING | Line exceeds 80 characters; contains 88 characters
 7 | WARNING | Line exceeds 80 characters; contains 146 characters
----------------------------------------------------------------------

Time: 822ms; Memory: 12MB
kunal_sahu’s picture

Status: Active » Needs work

I am working on fixing those errors. I will upload a patch shortly.

attiks’s picture

I just merged a lot to the 1.0.x branch, some CS issues are resoved as parts of another issue

kunal_sahu’s picture

StatusFileSize
new3.75 KB

Hey @ Rakhi Soni ,
I have solved the issues of coding standards but i still face some dependency injection issues for which i believe you have generated another issue.

kunal@kunal-HP-Laptop-15-db0xxx:/var/www/html/my_drupal$ vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/guidelines-3296028/

FILE: ...ules/contrib/guidelines-3296028/src/Controller/GuidelineJsonController.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 64 | WARNING | \Drupal calls should be avoided in classes, use dependency
    |         | injection instead
 77 | WARNING | \Drupal calls should be avoided in classes, use dependency
    |         | injection instead
--------------------------------------------------------------------------------

Time: 756ms; Memory: 12MB

Please review. Thanks,

kunal_sahu’s picture

Assigned: kunal_sahu » Unassigned
Status: Needs work » Needs review

  • attiks committed d953e2e on 1.0.x authored by kunal_sahu
    Issue #3296028 by kunal_sahu, Rakhi Soni, attiks: Drupal Coding Standard...
attiks’s picture

Status: Needs review » Fixed

Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.