Fix the issues reported by phpcs

Created on 26 April 2023, about 1 year ago
Updated 7 June 2024, 16 days ago

vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/views_bulk_reference_edit/

FILE: /var/www/html/vbd7/web/modules/contrib/views_bulk_reference_edit/views_bulk_reference_edit.libraries.yml
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd7/web/modules/contrib/views_bulk_reference_edit/src/Plugin/Action/ModifyReferencedEntityValues.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 4 WARNINGS AFFECTING 10 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
52 | WARNING | [ ] Possible useless method overriding detected
76 | ERROR | [ ] The array declaration extends to column 115 (the limit is 80). The array content should be split up over multiple lines
145 | ERROR | [ ] The array declaration extends to column 157 (the limit is 80). The array content should be split up over multiple lines
148 | ERROR | [x] Use null coalesce operator instead of ternary operator.
219 | ERROR | [x] Use null coalesce operator instead of ternary operator.
224 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
233 | WARNING | [ ] Unused variable $k.
234 | ERROR | [x] list(...) is forbidden, use [...] instead.
234 | WARNING | [ ] Unused variable $entity_type_id.
242 | WARNING | [ ] Unused variable $entity_type_id.
337 | ERROR | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd7/web/modules/contrib/views_bulk_reference_edit/css/views_bulk_reference_edit.css
--------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------
2 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
3 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd7/web/modules/contrib/views_bulk_reference_edit/README.txt
---------------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
---------------------------------------------------------------------------------
4 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
5 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
13 | WARNING | [ ] Line exceeds 80 characters; contains 100 characters
36 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters
37 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------

FILE: /var/www/html/vbd7/web/modules/contrib/views_bulk_reference_edit/views_bulk_reference_edit.info.yml
---------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
1 | WARNING | "core_version_requirement" property is missing in the info.yml file
---------------------------------------------------------------------------------------------------------

Time: 498ms; Memory: 14MB

๐Ÿ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia dineshkumarbollu

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 @dineshkumarbollu
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dineshkumarbollu

    I fixed most of the coding issues except unused variables in code.

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

    Hi provided patch in #2 get applied cleanly but still found some issue.
    Moving to Need work

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

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/views_bulk_reference_edit/src/Plugin/Action/ModifyReferencedEntityValues.php
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionProcessor.
    52 | WARNING | [ ] Possible useless method overriding detected
    237 | WARNING | [ ] Unused variable $k.
    238 | WARNING | [ ] Unused variable $entity_type_id.
    246 | WARNING | [ ] Unused variable $entity_type_id.
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Time: 261ms; Memory: 12MB

  • First commit to issue fork.
  • Status changed to Needs review 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia viren18febS

    i have fixed all the issue related to the phpcs , please review with the functionality also.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    silvi.addweb โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    I have checked and it's working fine. I also raised MR for the same.

Production build 0.69.0 2024