Issues reported by phpcs

Created on 10 January 2024, 6 months ago
Updated 30 January 2024, 5 months ago

Problem/Motivation

Steps to reproduce

$ vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source
FILE: ...90/tests/src/Kernel/Plugin/QueueWorker/MessageCheckAndDeleteWorkerTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 11 | ERROR | [x] Use statements should be sorted alphabetically. The first
    |       |     wrong one is
    |       |     Drupal\Tests\message\Kernel\MessageTemplateCreateTrait.
    |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...eb/modules/custom/message-3413890/tests/src/Functional/MessageTestBase.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\Tests\BrowserTestBase.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ules/custom/message-3413890/tests/src/Functional/MessageTemplateUiTest.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
   7 | ERROR   | [x] Use statements should be sorted alphabetically. The first
     |         |     wrong one is Drupal\message\Entity\Message.
     |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 123 | WARNING | [x] Inline @var declarations should use the /** */
     |         |     delimiters
     |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
 128 | ERROR   | [x] Functions must not contain multiple empty lines in a row;
     |         |     found 2 empty lines
     |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines)
 132 | WARNING | [x] Inline @var declarations should use the /** */
     |         |     delimiters
     |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...es/custom/message-3413890/tests/src/Functional/MessageTemplateCrudTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 32 | ERROR | The array declaration extends to column 125 (the limit is 120).
    |       | The array content should be split up over multiple lines
    |       | (Drupal.Arrays.Array.LongLineDeclaration)
--------------------------------------------------------------------------------
FILE: .../modules/custom/message-3413890/tests/src/Functional/MessageCreateTest.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
  6 | WARNING | [x] Unused use statement
    |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
 45 | WARNING | [x] Inline @var declarations should use the /** */
    |         |     delimiters
    |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...sage-3413890/web/modules/custom/message-3413890/src/MessageViewBuilder.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
 21 | WARNING | [x] Inline @var declarations should use the /** */
    |         |     delimiters
    |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
 38 | ERROR   | [x] list(...) is forbidden, use [...] instead.
    |         |     (SlevomatCodingStandard.PHP.ShortList.LongListUsed)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...3890/web/modules/custom/message-3413890/src/MessageTemplateListBuilder.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\Component\Utility\Xss.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...413890/web/modules/custom/message-3413890/src/MessageTemplateInterface.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 95 | ERROR | Public method name "MessageTemplateInterface::getRaWText" is not
    |       | in lowerCamel format
    |       | (Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps)
--------------------------------------------------------------------------------
FILE: ...13890/web/modules/custom/message-3413890/src/MessagePurgePluginManager.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 85 | ERROR | [x] Use null coalesce operator instead of ternary operator.
    |       |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...essage-3413890/web/modules/custom/message-3413890/src/MessageInterface.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
   6 | ERROR   | [x] Use statements should be sorted alphabetically. The first
     |         |     wrong one is
     |         |     Drupal\Core\Entity\ContentEntityInterface.
     |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 125 | WARNING | [ ] The deprecation-version 'message:1.2' does not match the
     |         |     lower-case machine-name standard: drupal:n.n.n or
     |         |     project:n.x-n.n or project:n.x-n.n-label[n] or
     |         |     project:n.n.n or project:n.n.n-label[n]
     |         |     (Drupal.Commenting.Deprecated.DeprecatedVersionFormat)
 125 | WARNING | [ ] The removal-version 'message:2.0' does not match the
     |         |     lower-case machine-name standard: drupal:n.n.n or
     |         |     project:n.x-n.n or project:n.x-n.n-label[n] or
     |         |     project:n.n.n or project:n.n.n-label[n]
     |         |     (Drupal.Commenting.Deprecated.DeprecatedVersionFormat)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...custom/message-3413890/src/Plugin/migrate/source/MessageTemplateSource.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin
    |         |     with a file doc comment
    |         |     (Drupal.Commenting.FileComment.NamespaceNoFileDoc)
 11 | WARNING | [x] Unused use statement
    |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
 11 | ERROR   | [x] Use statements should be sorted alphabetically. The first
    |         |     wrong one is Drupal\migrate\Row.
    |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 11 | ERROR   | [x] There must be one blank line after the last USE statement;
    |         |     0 found;
    |         |     (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...modules/custom/message-3413890/src/Plugin/migrate/source/MessageSource.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin
    |         |     with a file doc comment
    |         |     (Drupal.Commenting.FileComment.NamespaceNoFileDoc)
 11 | ERROR   | [x] Use statements should be sorted alphabetically. The first
    |         |     wrong one is Drupal\migrate\Row.
    |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 12 | WARNING | [x] Unused use statement
    |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
 12 | ERROR   | [x] There must be one blank line after the last USE statement;
    |         |     0 found;
    |         |     (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: .../message-3413890/src/Plugin/migrate/process/MessageTemplateProcessText.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 9 | ERROR | Missing short description in doc comment
   |       | (Drupal.Commenting.DocComment.MissingShort)
--------------------------------------------------------------------------------
FILE: ...tom/message-3413890/src/Plugin/migrate/process/MessageProcessArguments.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
  9 | ERROR | [ ] Missing short description in doc comment
    |       |     (Drupal.Commenting.DocComment.MissingShort)
 23 | ERROR | [x] Whitespace found at end of line
    |       |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...sage-3413890/src/Plugin/migrate/destination/MessageTemplateDestination.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  6 | ERROR | [x] Use statements should be sorted alphabetically. The first
    |       |     wrong one is Drupal\Core\Entity\EntityInterface.
    |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
  9 | ERROR | [ ] Missing short description in doc comment
    |       |     (Drupal.Commenting.DocComment.MissingShort)
 15 | ERROR | [x] Whitespace found at end of line
    |       |     (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...413890/web/modules/custom/message-3413890/src/Plugin/MessagePurge/Days.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 5 | WARNING | [x] Unused use statement
   |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ustom/message-3413890/src/FormElement/MessageTemplateMultipleTextField.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 123 | ERROR | [x] Use null coalesce operator instead of ternary operator.
     |       |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...413890/web/modules/custom/message-3413890/src/Form/MessageTemplateForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
 106 | ERROR   | [x] Use null coalesce operator instead of ternary
     |         |     operator.
     |         |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
 143 | WARNING | [ ] Possible useless method overriding detected
     |         |     (Generic.CodeAnalysis.UselessOverridingMethod.Found)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...-3413890/web/modules/custom/message-3413890/src/Entity/MessageTemplate.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
   5 | WARNING | [x] Unused use statement
     |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
 289 | ERROR   | [x] Use null coalesce operator instead of ternary
     |         |     operator.
     |         |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
 318 | WARNING | [ ] Possible useless method overriding detected
     |         |     (Generic.CodeAnalysis.UselessOverridingMethod.Found)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: .../message-3413890/web/modules/custom/message-3413890/src/Entity/Message.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 7 WARNINGS AFFECTING 7 LINES
--------------------------------------------------------------------------------
   6 | WARNING | [x] Unused use statement
     |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
   7 | WARNING | [x] Unused use statement
     |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
 351 | WARNING | [ ] Possible useless method overriding detected
     |         |     (Generic.CodeAnalysis.UselessOverridingMethod.Found)
 361 | WARNING | [ ] Possible useless method overriding detected
     |         |     (Generic.CodeAnalysis.UselessOverridingMethod.Found)
 371 | WARNING | [ ] Possible useless method overriding detected
     |         |     (Generic.CodeAnalysis.UselessOverridingMethod.Found)
 378 | WARNING | [ ] The deprecation-version 'message:1.2' does not match the
     |         |     lower-case machine-name standard: drupal:n.n.n or
     |         |     project:n.x-n.n or project:n.x-n.n-label[n] or
     |         |     project:n.n.n or project:n.n.n-label[n]
     |         |     (Drupal.Commenting.Deprecated.DeprecatedVersionFormat)
 378 | WARNING | [ ] The removal-version 'message:2.0' does not match the
     |         |     lower-case machine-name standard: drupal:n.n.n or
     |         |     project:n.x-n.n or project:n.x-n.n-label[n] or
     |         |     project:n.n.n or project:n.n.n-label[n]
     |         |     (Drupal.Commenting.Deprecated.DeprecatedVersionFormat)
 383 | ERROR   | [ ] The trigger_error message
     |         |     '\Drupal\message\Entity\Message::deleteMultiple is
     |         |     deprecated in message:1.2 and is removed from message:2.0.
     |         |     Instead, each entity should call the ::delete() method
     |         |     explicitly.' does not match the strict standard format:
     |         |     %thing% is deprecated in %deprecation-version% and is
     |         |     removed from %removal-version%. %extra-info%. See
     |         |     %cr-link%
     |         |     (Drupal.Semantics.FunctionTriggerError.TriggerErrorTextLayoutStrict)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ules/custom/message-3413890/modules/message_example/message_example.module
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 10 | ERROR | [x] Use statements should be sorted alphabetically. The first
    |       |     wrong one is Drupal\comment\Entity\Comment.
    |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ds/issue/message-3413890/web/modules/custom/message-3413890/message.module
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 10 | WARNING | [x] Unused use statement
    |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...s/issue/message-3413890/web/modules/custom/message-3413890/message.api.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
  75 | ERROR | [x] Separate the @throws and @see sections by a blank line.
     |       |     (Drupal.Commenting.DocComment.TagGroupSpacing)
 120 | ERROR | [x] Separate the @throws and @see sections by a blank line.
     |       |     (Drupal.Commenting.DocComment.TagGroupSpacing)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 645ms; Memory: 6MB
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE                                                            ERRORS  WARNINGS
--------------------------------------------------------------------------------
...-3413890/web/modules/custom/message-3413890/message.api.php  2       0
...e-3413890/web/modules/custom/message-3413890/message.module  0       1
...sage-3413890/modules/message_example/message_example.module  1       0
...web/modules/custom/message-3413890/src/MessageInterface.php  1       2
...es/custom/message-3413890/src/MessagePurgePluginManager.php  1       0
...les/custom/message-3413890/src/MessageTemplateInterface.php  1       0
...s/custom/message-3413890/src/MessageTemplateListBuilder.php  1       0
...b/modules/custom/message-3413890/src/MessageViewBuilder.php  1       1
...0/web/modules/custom/message-3413890/src/Entity/Message.php  1       7
...dules/custom/message-3413890/src/Entity/MessageTemplate.php  1       2
...les/custom/message-3413890/src/Form/MessageTemplateForm.php  1       1
...413890/src/FormElement/MessageTemplateMultipleTextField.php  1       0
...les/custom/message-3413890/src/Plugin/MessagePurge/Days.php  0       1
...c/Plugin/migrate/destination/MessageTemplateDestination.php  3       0
...3890/src/Plugin/migrate/process/MessageProcessArguments.php  2       0
...0/src/Plugin/migrate/process/MessageTemplateProcessText.php  1       0
...message-3413890/src/Plugin/migrate/source/MessageSource.php  3       1
...3413890/src/Plugin/migrate/source/MessageTemplateSource.php  3       1
.../message-3413890/tests/src/Functional/MessageCreateTest.php  0       2
...ge-3413890/tests/src/Functional/MessageTemplateCrudTest.php  1       0
...sage-3413890/tests/src/Functional/MessageTemplateUiTest.php  2       2
...om/message-3413890/tests/src/Functional/MessageTestBase.php  1       0
...rnel/Plugin/QueueWorker/MessageCheckAndDeleteWorkerTest.php  1       0
--------------------------------------------------------------------------------
A TOTAL OF 29 ERRORS AND 21 WARNINGS WERE FOUND IN 55 FILES
--------------------------------------------------------------------------------
PHPCBF CAN FIX 35 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
--------------------------------------------------------------------------------
    SOURCE                                                                 COUNT
--------------------------------------------------------------------------------
[x] SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.Incorrectl  9
[x] Drupal.Classes.UnusedUseStatement.UnusedUse                            8
[ ] Generic.CodeAnalysis.UselessOverridingMethod.Found                     5
[ ] Drupal.Commenting.Deprecated.DeprecatedVersionFormat                   4
[x] Drupal.Commenting.InlineVariableComment.VarInline                      4
[x] SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.  4
[ ] Drupal.Commenting.DocComment.MissingShort                              3
[x] Drupal.Commenting.DocComment.TagGroupSpacing                           2
[x] Drupal.Commenting.FileComment.NamespaceNoFileDoc                       2
[x] PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse                       2
[x] Squiz.WhiteSpace.SuperfluousWhitespace.EndLine                         2
[ ] Drupal.Arrays.Array.LongLineDeclaration                                1
[ ] Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps           1
[ ] Drupal.Semantics.FunctionTriggerError.TriggerErrorTextLayoutStrict     1
[x] SlevomatCodingStandard.PHP.ShortList.LongListUsed                      1
[x] Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines                      1
--------------------------------------------------------------------------------
A TOTAL OF 50 SNIFF VIOLATIONS WERE FOUND IN 16 SOURCES
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SOURCES AUTOMATICALLY (35 VIOLATIONS IN TOTAL)
--------------------------------------------------------------------------------

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bluegeek9

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Issue created by @bluegeek9
  • Merge request !23Resolve #3413895 "Issues reported by" β†’ (Merged) created by bluegeek9
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.2.x + Environment: PHP 8.1 & MySQL 8
    last update 6 months ago
    38 pass
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.2.x + Environment: PHP 8.1 & MySQL 8
    last update 6 months ago
    38 pass
  • Status changed to Needs review 6 months ago
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9
  • Status changed to Needs work 5 months ago
  • πŸ‡΅πŸ‡­Philippines paraderojether

    Hi bluegeek9,

    I reviewed MR! 23, applied against Message 8.x-1.x-dev with Drupal core version 10.1.7, and there are still remaining issues reported by phpcs shown below:

    jetherparadero@PrometSources-MacBook-Pro contrib % phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig, message
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/message.module
    ----------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------
     198 | WARNING | Unused variable $message.
    ----------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/tests/src/Functional/MessageEntityDelete.php
    ----------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------------------------------------
     172 | WARNING | Unused variable $delete_queue.
     174 | WARNING | Unused variable $check_delete_queue.
    ----------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/tests/src/Functional/MenuTest.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    -----------------------------------------------------------------------------------------------------------------------------------------
     36 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     40 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     42 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    -----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/tests/src/Functional/MessageTemplateUiTest.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
      69 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      87 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     109 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/tests/src/Kernel/Plugin/MessagePurge/QuotaTest.php
    ----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------------
     69 | WARNING | Unused variable $i.
    ----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/README.md
    -----------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    -----------------------------------------------------------------------------------------------
     21 | WARNING | Line exceeds 80 characters; contains 85 characters
     65 | WARNING | Line exceeds 80 characters; contains 82 characters
     90 | WARNING | Line exceeds 80 characters; contains 84 characters
    -----------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/modules/message_example/message_example.tokens.inc
    ----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------
     65 | WARNING | Unused variable $token_service.
     70 | WARNING | Unused variable $langcode.
     73 | WARNING | Unused variable $langcode.
     75 | WARNING | Unused variable $sanitize.
    ----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/src/FormElement/MessageTemplateMultipleTextField.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
      67 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      68 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      84 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     130 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/src/Form/MessageTemplateForm.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
     135 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     136 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/src/Form/MessageSettingsForm.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
      92 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      98 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      99 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     107 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     112 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     145 | WARNING | Unused variable $entity_id.
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/src/Form/MessageTemplateDeleteConfirm.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------------------------------------------
     18 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     25 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    -----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/src/Entity/MessageTemplate.php
    --------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------
     353 | WARNING | Unused variable $id.
    --------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/src/Entity/Message.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------------
     408 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/src/Plugin/migrate/process/MessageProcessArguments.php
    --------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------------------
     24 | ERROR | unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option.
    --------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/message/src/MessageTemplateListBuilder.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------------------------------------------
     20 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     22 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    -----------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 1.29 secs; Memory: 12MB

    Kindly check and advise, please.
    Thank you.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.2.x + Environment: PHP 8.1 & MySQL 8
    last update 5 months ago
    38 pass
  • Status changed to Fixed 5 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024