Problem/Motivation
Getting following error/warnings.
FILE: /var/www/html/modules/contrib/facebook_comments_block/facebook_comments_block.module
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------------------------------------------------
52 | WARNING | [x] A comma should follow the last multiline array item. Found: 'block--facebook-comments-block'
53 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
74 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
76 | ERROR | [ ] The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/facebook_comments_block/src/Plugin/Block/FacebookCommentsBlock.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 13 ERRORS AND 2 WARNINGS AFFECTING 15 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
268 | ERROR | [ ] The array declaration extends to column 146 (the limit is 80). The array content should be split up over multiple lines
269 | ERROR | [ ] The array declaration extends to column 158 (the limit is 80). The array content should be split up over multiple lines
270 | ERROR | [ ] The array declaration extends to column 142 (the limit is 80). The array content should be split up over multiple lines
271 | ERROR | [ ] The array declaration extends to column 158 (the limit is 80). The array content should be split up over multiple lines
272 | ERROR | [ ] The array declaration extends to column 144 (the limit is 80). The array content should be split up over multiple lines
273 | ERROR | [ ] The array declaration extends to column 164 (the limit is 80). The array content should be split up over multiple lines
274 | ERROR | [ ] The array declaration extends to column 154 (the limit is 80). The array content should be split up over multiple lines
275 | ERROR | [ ] The array declaration extends to column 144 (the limit is 80). The array content should be split up over multiple lines
284 | ERROR | [ ] The array declaration extends to column 114 (the limit is 80). The array content should be split up over multiple lines
290 | ERROR | [ ] The array declaration extends to column 127 (the limit is 80). The array content should be split up over multiple lines
296 | ERROR | [ ] The array declaration extends to column 107 (the limit is 80). The array content should be split up over multiple lines
309 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
310 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
327 | ERROR | [x] Expected newline after closing brace
333 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------
Time: 1.01 secs; Memory: 6MB
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/facebook_comments_block/
Proposed resolution
Above error/warnings need to be fixed.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3346407-Before-Apply-Patch-5.png | 2.53 MB | rassoni |
| #5 | 3346407-After-Apply-Patch-5.png | 1 MB | rassoni |
| #2 | 3346407-2.patch | 8.98 KB | samitk |
Issue fork facebook_comments_block-3346407
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
Comment #2
samitk commentedAbove error/warnings are fixed.
Comment #3
hardikpandya commentedThe patch resolves all phpcs issues. Marking RTBC!
Comment #5
rassoni commentedThe patch resolves all phpcs issues