Problem/Motivation
FILE: ...cms/drupal9/web/modules/contrib/private_message/private_message.tokens.inc
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
108 | ERROR | [x] Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ib/private_message/tests/src/Functional/PrivateMessageSettingsFormTest.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
73 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
--------------------------------------------------------------------------------
FILE: ..._cms/drupal9/web/modules/contrib/private_message/private_message.theme.inc
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
--------------------------------------------------------------------------------
17 | ERROR | The array declaration extends to column 152 (the limit is 80).
| | The array content should be split up over multiple lines
17 | ERROR | The array declaration extends to column 151 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------
FILE: ...l/drupal_cms/drupal9/web/modules/contrib/private_message/js/history_api.js
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
41 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
42 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
49 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...9/web/modules/contrib/private_message/js/private_message_members_widget.js
--------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 12 LINES
--------------------------------------------------------------------------------
27 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
28 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
29 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
96 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
109 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
112 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
116 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
173 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but
| | found "null"
244 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
308 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
465 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
500 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...b/modules/contrib/private_message/js/private_message_notification_block.js
--------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------------
24 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
25 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
26 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
77 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
84 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
102 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...pal9/web/modules/contrib/private_message/js/private_message_inbox_block.js
--------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------------
26 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
27 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
28 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
40 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
52 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
121 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
134 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
180 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...s/drupal9/web/modules/contrib/private_message/js/private_message_thread.js
--------------------------------------------------------------------------------
FOUND 11 ERRORS AFFECTING 11 LINES
--------------------------------------------------------------------------------
32 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
33 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
34 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
64 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
85 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
164 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
183 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
228 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
245 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
271 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
359 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: .../web/modules/contrib/private_message/src/Service/PrivateMessageService.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
356 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
366 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
378 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
--------------------------------------------------------------------------------
FILE: ...odules/contrib/private_message/src/Service/PrivateMessageThreadManager.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
106 | WARNING | Unused private method addMessage()
118 | WARNING | Unused private method sendNotification()
--------------------------------------------------------------------------------
FILE: ...rupal9/web/modules/contrib/private_message/src/Form/PrivateMessageForm.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
180 | ERROR | [x] Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
199 | ERROR | [x] Data types in @var tags need to be fully namespaced
199 | ERROR | [x] Data types in @var tags need to be fully namespaced
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...s/contrib/private_message/src/Entity/Builder/PrivateMessageViewBuilder.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
28 | ERROR | [ ] Parameter $entityType is not described in comment
33 | ERROR | [ ] Doc comment for parameter $entityTypeManager does not match
| | actual variable name $entity_display_repository
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...rib/private_message/src/Entity/Builder/PrivateMessageThreadViewBuilder.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
127 | ERROR | [ ] The array declaration extends to column 110 (the limit is
| | 80). The array content should be split up over multiple
| | lines
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...l9/web/modules/contrib/private_message/src/Mapper/PrivateMessageMapper.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
205 | WARNING | Code after the RETURN statement on line 198 cannot be executed
227 | ERROR | The array declaration extends to column 92 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------
FILE: ...e/src/Plugin/Field/FieldFormatter/PrivateMessageThreadMessageFormatter.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
316 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ge/src/Plugin/Field/FieldFormatter/PrivateMessageThreadMemberFormatter.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
280 | ERROR | The array declaration extends to column 160 (the limit is 80).
| | The array content should be split up over multiple lines
309 | WARNING | Only string literals should be passed to t() where possible
--------------------------------------------------------------------------------
FILE: ...trib/private_message/src/PluginManager/PrivateMessageConfigFormManager.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
8 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be
| | referenced with use statements
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 1.23 secs; Memory: 18MB
Steps to reproduce
Run following command
phpcs --standard=“Drupal,DrupalPractice” --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js .
Comments
Comment #2
rohit rana commentedComment #3
rohit rana commentedComment #4
Arturo-q commentedHi, I will review it.
Comment #5
Arturo-q commentedHi, I reviewed the patch #2, it fixes all the CS of the scope (There are others CS errors remaining, but they are not related to the issue).
So, Moving to RTBC.
Comment #8
vadym.tseiko commentedAccording to maintainers comment, branch 8.x-2.x-dev - only bugfix. Move update for fix reported by phpcs to branch 3.0.x-dev.
Comment #10
artem_sylchukCommitted in #3297889: Drupal 10 compatibility fixes + minor codebase improvements.
Comment #11
vadym.tseiko commentedIt seems that my commit with the updated phpcs fix did not add. Need to re-add changes to the repository.
Comment #15
rohit rana commentedComment #16
rohit rana commentedHi @artem_sylchuk Please Review.
Comment #17
avpadernoThe issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.
Comment #18
avpadernoComment #19
imustakim commentedIssue summary updated.
Comment #20
rohit rana commentedComment #21
rohit rana commentedComment #22
artem_sylchukThis wasn't committed into the module's code and shouldn't be in the fixed status.
Comment #23
artem_sylchukMoreover I don't see any mergable MRs into 3.x branch right now so I guess some work is still needed there.
Comment #24
avpadernoComment #25
nitin_lamaComment #27
nitin_lamaComment #30
nikolay shapovalov commentedI create MR 73, there are several issues left, I am not sure how to fix. Please check MR for more info.
Comment #46
bohartPHPCS job is now green.
Still, there are some issues with eslint, stylelint and phpstan. They will be processed at:
- #3417731: Fix the issues reported by phpstan
Thanks all!