Problem/Motivation

Getting following error/warnings

FILE: /app/modules/contrib/http_cache_control/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
15 | WARNING | Line exceeds 80 characters; contains 84 characters
37 | WARNING | Line exceeds 80 characters; contains 86 characters
39 | WARNING | Line exceeds 80 characters; contains 83 characters
46 | WARNING | Line exceeds 80 characters; contains 109 characters
----------------------------------------------------------------------

FILE: /app/modules/contrib/http_cache_control/http_cache_control.info.yml
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
-----------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/http_cache_control/http_cache_control.module
------------------------------------------------------------------------------------
FOUND 14 ERRORS AND 1 WARNING AFFECTING 14 LINES
------------------------------------------------------------------------------------
10 | WARNING | [x] Unused use statement
10 | ERROR | [x] When importing a class with "use", do not include a leading \
26 | ERROR | [x] Expected 1 blank line after function; 2 found
102 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
103 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
104 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
105 | ERROR | [x] Array closing indentation error, expected 2 spaces but found 4
123 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
124 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
125 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
126 | ERROR | [x] Array closing indentation error, expected 2 spaces but found 4
145 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
146 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
147 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
148 | ERROR | [x] Array closing indentation error, expected 2 spaces but found 4
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 15 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------

FILE: /app/modules/contrib/http_cache_control/tests/src/HttpCacheControlTest.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 7 LINES
--------------------------------------------------------------------------------------------------------------------------------------
14 | ERROR | Missing member variable doc comment
26 | ERROR | The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
49 | ERROR | The array declaration extends to column 99 (the limit is 80). The array content should be split up over multiple lines
49 | ERROR | The array declaration extends to column 98 (the limit is 80). The array content should be split up over multiple lines
59 | ERROR | The array declaration extends to column 100 (the limit is 80). The array content should be split up over multiple lines
59 | ERROR | The array declaration extends to column 99 (the limit is 80). The array content should be split up over multiple lines
72 | ERROR | The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
72 | ERROR | The array declaration extends to column 95 (the limit is 80). The array content should be split up over multiple lines
79 | ERROR | The array declaration extends to column 109 (the limit is 80). The array content should be split up over multiple lines
79 | ERROR | The array declaration extends to column 108 (the limit is 80). The array content should be split up over multiple lines
86 | ERROR | The array declaration extends to column 109 (the limit is 80). The array content should be split up over multiple lines
86 | ERROR | The array declaration extends to column 108 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------

Time: 1.04 secs; Memory: 10MB

Steps to reproduce

Run following command

phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/http_cache_control/

Proposed resolution

Above error/warnings need to be fixed

CommentFileSizeAuthor
#2 3330964-2.patch7.29 KBsamitk
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

samit.310@gmail.com created an issue. See original summary.

samitk’s picture

Assigned: samitk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new7.29 KB

Error/warnings are fixed.

charchil khandelwal’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -, -

Patch #2 applied cleanly, and all errors and warnings are fixed.
So moving it to RTBC.
Thanks

charchil khandelwal’s picture

Created MR!

dieterholvoet’s picture

The $dumpHeaders property in HttpCacheControlTest is leftover from when the class extended WebTestBase. Since it extends BrowserTestBase, the property isn't used anymore, so I'll just remove it.

  • DieterHolvoet committed 8e0bfc1d on 8.x-2.x
    Issue #3330964 by Charchil Khandelwal, DieterHolvoet, samit.310@gmail....
dieterholvoet’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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