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 .

CommentFileSizeAuthor
#2 coding-standared-3317985-2.patch23.74 KBrohit rana
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

Rohit Rana created an issue. See original summary.

rohit rana’s picture

StatusFileSize
new23.74 KB
rohit rana’s picture

Assigned: rohit rana » Unassigned
Status: Active » Needs review
Arturo-q’s picture

Assigned: Unassigned » Arturo-q

Hi, I will review it.

Arturo-q’s picture

Assigned: Arturo-q » Unassigned
Status: Needs review » Reviewed & tested by the community

Hi, 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.

Vadym.Tseiko made their first commit to this issue’s fork.

vadym.tseiko’s picture

Version: 8.x-2.0-beta18 » 3.0.x-dev
Assigned: Unassigned » vadym.tseiko
Issue tags: +LutskGCW23
Parent issue: » #3317985: Fix the issues reported by phpcs

According to maintainers comment, branch 8.x-2.x-dev - only bugfix. Move update for fix reported by phpcs to branch 3.0.x-dev.

artem_sylchuk’s picture

Status: Reviewed & tested by the community » Fixed
vadym.tseiko’s picture

Status: Fixed » Needs work

It seems that my commit with the updated phpcs fix did not add. Need to re-add changes to the repository.

rohit rana’s picture

Status: Needs work » Needs review
rohit rana’s picture

Assigned: vadym.tseiko » Unassigned

Hi @artem_sylchuk Please Review.

avpaderno’s picture

Priority: Normal » Minor
Status: Needs review » Needs work
Issue tags: +Needs issue summary update

The 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.

avpaderno’s picture

Title: Fix what reported by phpcs » Fix the issues reported by phpcs
imustakim’s picture

Issue summary: View changes

Issue summary updated.

rohit rana’s picture

Status: Needs work » Needs review
rohit rana’s picture

Status: Needs review » Fixed
artem_sylchuk’s picture

Status: Fixed » Needs review

This wasn't committed into the module's code and shouldn't be in the fixed status.

artem_sylchuk’s picture

Status: Needs review » Needs work

Moreover I don't see any mergable MRs into 3.x branch right now so I guess some work is still needed there.

avpaderno’s picture

nitin_lama’s picture

Assigned: Unassigned » nitin_lama

nitin_lama’s picture

Assigned: nitin_lama » Unassigned

zniki.ru made their first commit to this issue’s fork.

nikolay shapovalov’s picture

Status: Needs work » Needs review

I create MR 73, there are several issues left, I am not sure how to fix. Please check MR for more info.

bohart made their first commit to this issue’s fork.

bohart changed the visibility of the branch 3.0.x to hidden.

bohart changed the visibility of the branch 3317985-fix-what-reported to hidden.

bohart changed the visibility of the branch private_message_phpcs_fix-33179853317985 to hidden.

bohart changed the visibility of the branch private_message_fix_phpcs-33179853317985 to hidden.

bohart changed the visibility of the branch 3317985-3.0.x-fix-cs to hidden.

bohart changed the visibility of the branch private_message_phpcs_fix33179853317985 to hidden.

  • bohart committed f3077c2e on 3.0.x
    Issue #3317985 by bohart: Fixed the issues reported by phpcs.
    

bohart credited gilmord.

bohart’s picture

Status: Needs review » Fixed
Issue tags: +LutskGCW24

PHPCS 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!

Status: Fixed » Closed (fixed)

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