Fix the issues reported by phpcs

Created on 10 July 2023, over 1 year ago
Updated 11 July 2024, 5 months ago

Problem/Motivation

FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/adv_varnish.module
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
  76 | ERROR   | [ ] The array declaration extends to column 108 (the limit is 80). The array content should be split up over multiple lines
  77 | ERROR   | [ ] The array declaration extends to column 98 (the limit is 80). The array content should be split up over multiple lines
 175 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
 227 | ERROR   | [x] Expected 1 space after FUNCTION keyword; 0 found
 229 | ERROR   | [x] Array indentation error, expected 6 spaces but found 4
 229 | ERROR   | [x] Closing parenthesis of array declaration must be on a new line
 251 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/src/CookieManager.php
---------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------
 128 | ERROR | The $_COOKIE super global must not be accessed directly; inject the request_stack service and use
     |       | $stack->getCurrentRequest()->cookies->get(static::COOKIE_BIN) instead
 131 | ERROR | The $_COOKIE super global must not be accessed directly; inject the request_stack service and use
     |       | $stack->getCurrentRequest()->cookies->get(static::COOKIE_BIN) instead
 205 | ERROR | The $_COOKIE super global must not be accessed directly; inject the request_stack service and use
     |       | $stack->getCurrentRequest()->cookies instead
---------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/src/EventSubscriber/RouteSubscriber.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactoryInterface.
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/src/EventSubscriber/CacheableResponseSubscriber.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\adv_varnish\CacheManagerInterface.
----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/src/CacheManager.php
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 6 WARNINGS AFFECTING 8 LINES
---------------------------------------------------------------------------------------------------------------------------------------
  16 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactoryInterface.
 188 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 197 | WARNING | [x] '@TODO: replace X-Varnish-Purge to the const.' should match the format '@todo Fix problem X here.'
 212 | WARNING | [x] '@TODO: use the const.' should match the format '@todo Fix problem X here.'
 228 | WARNING | [x] '@TODO: use the const.' should match the format '@todo Fix problem X here.'
 355 | WARNING | [ ] Line exceeds 80 characters; contains 113 characters
 434 | WARNING | [ ] NodeType::load calls should be avoided in classes, use dependency injection instead
 485 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
---------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/src/UserBlocksManager.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Cache\CacheBackendInterface.
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/src/Form/CacheSettingsForm.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\ConfigFormBase.
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/src/Form/ClearCacheForm.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\adv_varnish\CacheManagerInterface.
----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/src/Form/CacheBlockForm.php
-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------
 16 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\StringTranslation\StringTranslationTrait.
-----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/src/Controller/UserBlocksController.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
 10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Serialization\Json.
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/src/Controller/ESIBlockController.php
------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------
  71 | WARNING | [ ] Block::load calls should be avoided in classes, use dependency injection instead
 100 | ERROR   | [x] Expected 1 space(s) after cast statement; 0 found
 103 | ERROR   | [x] Expected 1 space(s) after cast statement; 0 found
------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/adv_varnish.links.task.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: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/tests/modules/adv_varnish_block_test/adv_varnish_block_test.info.yml
-----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-----------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/tests/modules/adv_varnish_block_test/src/Plugin/UserBlocks/Example.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\StringTranslation\StringTranslationTrait.
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/adv_varnish/tests/src/Functional/NodeCachingTest.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------------------------
  58 | ERROR | The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
 118 | ERROR | The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
 142 | ERROR | The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------

Time: 377ms; Memory: 12MB

Steps to reproduce

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

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs work

Version

4.0

Component

Code

Created by

🇮🇳India roshni27

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 @roshni27
  • Issue was unassigned.
  • 🇮🇳India roshni27

    Some issues remain which better know to maintainer other all isuues solved. please review the patch.

  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • 🇮🇳India mrinalini9 New Delhi

    Hi,

    I have reviewed patch #2, it applied cleanly and resolved some of the issues mentioned above but still getting below errors/warnings that need to be fixed:

    FILE: /Users/mrinalini.kumari/Documents/do_contributions/adv_varnish/adv_varnish.module
    ---------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------------
      76 | ERROR   | [ ] The array declaration extends to column 108 (the limit is 80). The array content should be split up over multiple lines
      77 | ERROR   | [ ] The array declaration extends to column 98 (the limit is 80). The array content should be split up over multiple lines
     175 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
     227 | ERROR   | [x] Expected 1 space after FUNCTION keyword; 0 found
     229 | ERROR   | [x] Array indentation error, expected 6 spaces but found 4
     229 | ERROR   | [x] Closing parenthesis of array declaration must be on a new line
     251 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
    ---------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/mrinalini.kumari/Documents/do_contributions/adv_varnish/src/CacheManager.php
    ----------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------
     187 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     354 | WARNING | Line exceeds 80 characters; contains 113 characters
    ----------------------------------------------------------------------------------------------

    So, moving this to Needs Work.

    Thanks!

  • Assigned to nitin_lama
  • 🇮🇳India nitin_lama India

    Fixed most of the issues.
    Only remaining issue is of DI.

  • Issue was unassigned.
  • First commit to issue fork.
  • @bharath-kondeti opened merge request.
  • Status changed to Needs review 11 months ago
  • Status changed to Needs work 5 months ago
  • 🇮🇳India bhaveshdas

    I applied MR!13 and I still encountered some issues after I ran vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig modules/custom/adv_varnish-3373546/

    FILE: /var/www/html/drupal-contri-d10/modules/custom/adv_varnish-3373546/src/EventSubscriber/CacheableResponseSubscriber.php
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 11 ERRORS AFFECTING 9 LINES
    ----------------------------------------------------------------------------------------------------------------------------
     80 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     81 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     82 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     83 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     84 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     85 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     86 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     87 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     88 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     88 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     88 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    ----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/adv_varnish-3373546/src/Form/CacheSettingsForm.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 7 ERRORS AFFECTING 5 LINES
    -------------------------------------------------------------------------------------------------------------------------
     61 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     62 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     63 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     64 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     65 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     65 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     65 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/adv_varnish-3373546/src/Form/DeflateForm.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 3 LINES
    -------------------------------------------------------------------------------------------------------------------------
     49 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     50 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     51 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     51 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     51 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/adv_varnish-3373546/src/Form/CacheBlockForm.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 9 ERRORS AFFECTING 7 LINES
    -------------------------------------------------------------------------------------------------------------------------
     50 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     51 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     52 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     53 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     54 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     55 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     56 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     56 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     56 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/adv_varnish-3373546/src/CookieManager.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 9 ERRORS AFFECTING 7 LINES
    -------------------------------------------------------------------------------------------------------------------------
     90 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     91 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     92 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     93 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     94 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     95 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     96 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     96 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     96 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/adv_varnish-3373546/src/RequestHandler.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 8 ERRORS AFFECTING 6 LINES
    -------------------------------------------------------------------------------------------------------------------------
     87 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     88 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     89 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     90 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     91 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     92 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     92 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     92 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/adv_varnish-3373546/src/Controller/ESIBlockController.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------------------
     42 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     43 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     43 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     43 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/adv_varnish-3373546/src/Controller/UserBlocksController.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 3 LINES
    -------------------------------------------------------------------------------------------------------------------------
     53 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     54 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     55 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     55 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     55 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/adv_varnish-3373546/src/CacheManager.php
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 13 ERRORS AND 1 WARNING AFFECTING 12 LINES
    ----------------------------------------------------------------------------------------------------------------------------
     155 | ERROR   | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     156 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     157 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     158 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     159 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     160 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     161 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     162 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     163 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     164 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     165 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     165 | ERROR   | [x] Multi-line function declarations must have a trailing comma after the last parameter
     165 | ERROR   | [x] The closing parenthesis of a multi-line function declaration must be on a new line
     187 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
    ----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/adv_varnish-3373546/js/adv_varnish_user_data.js
    ----------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------
     28 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    ----------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------
    
    Time: 949ms; Memory: 14MB
    
Production build 0.71.5 2024