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.

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
new8.98 KB

Above error/warnings are fixed.

hardikpandya’s picture

Status: Needs review » Reviewed & tested by the community

The patch resolves all phpcs issues. Marking RTBC!

rassoni’s picture

Issue tags: -, -
StatusFileSize
new1 MB
new2.53 MB

The patch resolves all phpcs issues