t() calls should be avoided in classes

Created on 12 March 2024, 3 months ago
Updated 25 May 2024, 29 days ago

Drupal classes should not use t() to translate strings, but use dependency injection, for example via StringTranslationTrait.

šŸ“Œ Task
Status

Needs review

Version

2.0

Component

Code

Created by

šŸ‡®šŸ‡³India chaitanyadessai

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

Merge Requests

Comments & Activities

  • Issue created by @chaitanyadessai
  • Issue was unassigned.
  • Status changed to Needs review 3 months ago
  • Open in Jenkins ā†’ Open on Drupal.org ā†’
    Core: 10.2.x + Environment: PHP 8.2 & MySQL 8
    last update 3 months ago
    10 pass
  • šŸ‡®šŸ‡³India chaitanyadessai

    Please review.

  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Open in Jenkins ā†’ Open on Drupal.org ā†’
    Core: 10.2.x + Environment: PHP 8.2 & MySQL 8
    last update 3 months ago
    10 pass
  • Status changed to Needs work about 1 month ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @apaderno,

    I applied MR!14, it was applied smoothly and fixed all the t() calls issues.

    However, when I run phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml, I encountered some issues.

    āžœ  force_password_change git:(2.0.x) curl https://git.drupalcode.org/project/force_password_change/-/merge_requests/14.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  7302    0  7302    0     0  11706      0 --:--:-- --:--:-- --:--:-- 11701
    patching file src/Entity/User/ForcePasswordChangeRoleListBuilder.php
    patching file src/EventSubscriber/ForcePasswordChangeConfigPostUpdateSubscriber.php
    patching file src/EventSubscriber/ForcePasswordChangeEventSubscriber.php
    patching file src/Service/ForcePasswordChangeService.php
    āžœ  force_password_change git:(2.0.x) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml force_password_change
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/force_password_change.install
    ----------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------
     3 | ERROR | Missing short description in doc comment
    ----------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/tests/src/Unit/Service/ForcePasswordChangeServiceTest.php
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 6 ERRORS AFFECTING 6 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\force_password_change_service_test\Service\ForcePasswordChangeServiceTest.
     29 | ERROR | [ ] Missing @var tag in member variable comment
     34 | ERROR | [ ] Missing @var tag in member variable comment
     39 | ERROR | [ ] Missing @var tag in member variable comment
     44 | ERROR | [ ] Missing @var tag in member variable comment
     49 | ERROR | [ ] Missing @var tag in member variable comment
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/tests/src/Functional/ForcePasswordChangeBrowserTestBase.php
    ----------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 19 ERRORS AFFECTING 19 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------------------
      12 | ERROR | Doc comment is empty
      19 | ERROR | Doc comment is empty
      26 | ERROR | Doc comment is empty
      33 | ERROR | Doc comment is empty
      40 | ERROR | Doc comment is empty
      47 | ERROR | Doc comment is empty
      54 | ERROR | Doc comment is empty
      61 | ERROR | Doc comment is empty
      68 | ERROR | Doc comment is empty
      81 | ERROR | Doc comment is empty
      95 | ERROR | Doc comment is empty
     110 | ERROR | Doc comment is empty
     117 | ERROR | Doc comment is empty
     131 | ERROR | Doc comment is empty
     146 | ERROR | Doc comment is empty
     159 | ERROR | Doc comment is empty
     170 | ERROR | Doc comment is empty
     181 | ERROR | Doc comment is empty
     192 | ERROR | Doc comment is empty
    ----------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/tests/src/Functional/ForcePasswordChangeAdminUiTest.php
    ------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AND 10 WARNINGS AFFECTING 6 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------------
      5 | ERROR   | [ ] Missing short description in doc comment
     26 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
     56 | WARNING | [ ] Line exceeds 80 characters; contains 200 characters
     56 | WARNING | [x] There must be no blank line following an inline comment
     56 | WARNING | [ ] There must be no blank line following an inline comment
     69 | WARNING | [ ] Line exceeds 80 characters; contains 184 characters
     69 | WARNING | [x] There must be no blank line following an inline comment
     69 | WARNING | [ ] There must be no blank line following an inline comment
     89 | WARNING | [ ] Line exceeds 80 characters; contains 249 characters
     91 | WARNING | [ ] Line exceeds 80 characters; contains 233 characters
     91 | WARNING | [x] There must be no blank line following an inline comment
     91 | WARNING | [ ] There must be no blank line following an inline comment
    ------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/force_password_change.module
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 453 ERRORS AND 8 WARNINGS AFFECTING 188 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       3 | ERROR   | [ ] Missing short description in doc comment
      17 | ERROR   | [x] Opening brace should be on the same line as the declaration
      18 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      18 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
      18 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      19 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      19 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
      19 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
      19 | ERROR   | [x] Expected 1 space after closing parenthesis; found 2
      20 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      20 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
      21 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      21 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      22 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      22 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      22 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      23 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      23 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      23 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
      23 | ERROR   | [x] Expected 1 space after closing parenthesis; found 3
      24 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      24 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      25 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      25 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      26 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      26 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      27 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      27 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      27 | ERROR   | [x] Expected 1 space after ELSE keyword; newline found
      28 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      28 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      29 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      29 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      30 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      30 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      32 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      32 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      32 | ERROR   | [x] Short array syntax must be used to define arrays
      32 | ERROR   | [x] There must be no space between the "array" keyword and the opening parenthesis
      33 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      33 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      33 | ERROR   | [x] Array indentation error, expected 4 spaces but found 2
      34 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      34 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
      34 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
      35 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      35 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
      35 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
      36 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      36 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
      36 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
      37 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      39 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      39 | WARNING | [ ] Line exceeds 80 characters; contains 92 characters
      39 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      39 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      40 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      40 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      41 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      41 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
      42 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      42 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
      42 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      43 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      43 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
      43 | ERROR   | [x] Expected 1 space after ELSEIF keyword; 0 found
      43 | ERROR   | [x] Expected 1 space after closing parenthesis; found 2
      44 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      44 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
      45 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      45 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      46 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      46 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      46 | ERROR   | [x] Short array syntax must be used to define arrays
      46 | ERROR   | [x] There must be no space between the "array" keyword and the opening parenthesis
      47 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      47 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      47 | ERROR   | [x] Array indentation error, expected 4 spaces but found 2
      48 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      48 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
      48 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
      49 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      49 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
      49 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
      50 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      52 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      52 | WARNING | [ ] Line exceeds 80 characters; contains 100 characters
      52 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      52 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      53 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      53 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      54 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      54 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
      55 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      55 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
      55 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      56 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      56 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
      56 | ERROR   | [x] Expected 1 space after ELSEIF keyword; 0 found
      56 | ERROR   | [x] Expected 1 space after closing parenthesis; found 2
      57 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      57 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
      59 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      59 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      60 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      60 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      60 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      61 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      61 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      61 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
      61 | ERROR   | [x] Expected 1 space after closing parenthesis; found 3
      62 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      62 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
      63 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      63 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      64 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      64 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      64 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      65 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      65 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      65 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
      65 | ERROR   | [x] Expected 1 space after closing parenthesis; found 4
      66 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      66 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      67 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      67 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
      68 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      68 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      69 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      69 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      69 | ERROR   | [x] Expected 1 space after ELSE keyword; newline found
      70 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      70 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      71 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      71 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
      72 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      72 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      73 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      73 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      74 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      74 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      74 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      75 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      75 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      76 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      76 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      78 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      78 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      78 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      79 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      79 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      79 | ERROR   | [x] Short array syntax must be used to define arrays
      79 | ERROR   | [x] There must be no space between the "array" keyword and the opening parenthesis
      80 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      80 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      80 | ERROR   | [x] Array indentation error, expected 5 spaces but found 3
      81 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      81 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
      81 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
      82 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      82 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
      82 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
      83 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      83 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
      83 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
      84 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      85 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      85 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      85 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      86 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      86 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      87 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      87 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      87 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
      87 | ERROR   | [x] Expected 1 space after closing parenthesis; found 4
      88 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      88 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      89 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      89 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
      90 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      90 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      92 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      92 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      92 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      93 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      93 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      93 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
      93 | ERROR   | [x] Expected 1 space after closing parenthesis; found 4
      94 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      94 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      95 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      95 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
      96 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      96 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      97 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      97 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      97 | ERROR   | [x] Expected 1 space after ELSE keyword; newline found
      98 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      98 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
      99 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
      99 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     100 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     100 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     101 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     101 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     101 | ERROR   | [x] Short array syntax must be used to define arrays
     101 | ERROR   | [x] There must be no space between the "array" keyword and the opening parenthesis
     102 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     102 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     102 | ERROR   | [x] Array indentation error, expected 5 spaces but found 3
     103 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     103 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
     103 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
     104 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     104 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
     104 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
     105 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     105 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
     105 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
     106 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     106 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
     106 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
     107 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     109 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     109 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     109 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     110 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     110 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     111 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     111 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     111 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
     111 | ERROR   | [x] Expected 1 space after closing parenthesis; found 4
     112 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     112 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     113 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     113 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     114 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     114 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     115 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     115 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     115 | ERROR   | [x] Expected 1 space after ELSEIF keyword; 0 found
     115 | ERROR   | [x] Expected 1 space after closing parenthesis; found 4
     116 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     116 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     117 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     117 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     118 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     118 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     119 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     119 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     119 | ERROR   | [x] Expected 1 space after ELSE keyword; newline found
     120 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     120 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     121 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     121 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     122 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     122 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     122 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
     122 | ERROR   | [x] Expected 1 space after closing parenthesis; found 5
     123 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     123 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     124 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     124 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 5
     125 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     125 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     126 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     126 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     126 | ERROR   | [x] Expected 1 space after ELSE keyword; newline found
     127 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     127 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     128 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     128 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 5
     129 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     129 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     130 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     130 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     132 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     132 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     133 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     133 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     134 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     134 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     135 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     135 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     137 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     137 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     137 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     138 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     138 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     139 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     139 | ERROR   | [x] Line indented incorrectly; expected at least 6 spaces, found 4
     139 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
     140 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     140 | ERROR   | [x] Line indented incorrectly; expected at least 6 spaces, found 5
     140 | ERROR   | [x] Array indentation error, expected 6 spaces but found 5
     141 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     141 | ERROR   | [x] Line indented incorrectly; expected at least 6 spaces, found 5
     141 | ERROR   | [x] Array indentation error, expected 6 spaces but found 5
     142 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     142 | ERROR   | [x] Line indented incorrectly; expected at least 6 spaces, found 5
     142 | ERROR   | [x] Array indentation error, expected 6 spaces but found 5
     143 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     144 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     144 | ERROR   | [x] Line indented incorrectly; expected at least 6 spaces, found 4
     144 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
     145 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     145 | ERROR   | [x] Line indented incorrectly; expected at least 6 spaces, found 5
     145 | ERROR   | [x] Array indentation error, expected 6 spaces but found 5
     146 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     146 | ERROR   | [x] Line indented incorrectly; expected at least 6 spaces, found 5
     146 | ERROR   | [x] Array indentation error, expected 6 spaces but found 5
     147 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     148 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     149 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     149 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     151 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     151 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     151 | ERROR   | [ ] The $_GET super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->query->get('pass-reset-token') instead
     151 | ERROR   | [ ] The $_GET super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->query->get('pass-reset-token') instead
     152 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     152 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     153 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     153 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     154 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     154 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     155 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     155 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     155 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
     155 | ERROR   | [x] Expected 1 space after closing parenthesis; found 3
     156 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     156 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     157 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     157 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     158 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     158 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     159 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     159 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     160 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     160 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     161 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     161 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     162 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     162 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     162 | ERROR   | [ ] The array declaration extends to column 289 (the limit is 120). The array content should be split up over multiple lines
     163 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     163 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     165 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     165 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
     165 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     165 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     166 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     166 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     166 | ERROR   | [x] Short array syntax must be used to define arrays
     166 | ERROR   | [x] There must be no space between the "array" keyword and the opening parenthesis
     167 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     167 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     167 | ERROR   | [x] Array indentation error, expected 4 spaces but found 2
     168 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     168 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
     168 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
     169 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     169 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
     169 | ERROR   | [x] Array indentation error, expected 4 spaces but found 3
     170 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     172 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     172 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
     172 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     173 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     173 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     173 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     174 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     174 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     175 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     175 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     176 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     176 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     177 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     177 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     177 | ERROR   | [x] Expected 1 space after ELSEIF keyword; 0 found
     177 | ERROR   | [x] Expected 1 space after closing parenthesis; found 2
     178 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     178 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     179 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     179 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     180 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     180 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     180 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     181 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     181 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     181 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
     181 | ERROR   | [x] Expected 1 space after closing parenthesis; found 3
     182 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     182 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     183 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     183 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     183 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     184 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     184 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     184 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
     184 | ERROR   | [x] Expected 1 space after closing parenthesis; found 4
     185 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     185 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     186 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     186 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     187 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     187 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     188 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     188 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     188 | ERROR   | [x] Expected 1 space after ELSE keyword; newline found
     189 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     189 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     190 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     190 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     191 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     191 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     192 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     192 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     193 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     193 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     194 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     194 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     195 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     195 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     196 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     196 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     197 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     197 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     197 | ERROR   | [x] Short array syntax must be used to define arrays
     197 | ERROR   | [x] There must be no space between the "array" keyword and the opening parenthesis
     198 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     198 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     198 | ERROR   | [x] Array indentation error, expected 5 spaces but found 3
     199 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     199 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
     199 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
     200 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     200 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
     200 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
     201 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     201 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
     201 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
     202 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     202 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
     202 | ERROR   | [x] Array indentation error, expected 5 spaces but found 4
     203 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     204 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     204 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     205 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     205 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     206 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     206 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     219 | ERROR   | [ ] The $_REQUEST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('form_id') instead
     219 | ERROR   | [ ] The $_REQUEST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('form_id') instead
     250 | WARNING | [ ] Unused variable $query.
     263 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
     275 | ERROR   | [ ] Doc comment is empty
     282 | WARNING | [ ] Unused variable $db.
     309 | ERROR   | [ ] Doc comment is empty
     327 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
     339 | WARNING | [ ] Line exceeds 80 characters; contains 95 characters
     374 | WARNING | [ ] Unused variable $query.
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 444 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/src/Form/AdminForm.php
    ---------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 5 WARNINGS AFFECTING 9 LINES
    ---------------------------------------------------------------------------------------------------------------
      16 | ERROR   | Doc comment is empty
      68 | ERROR   | Doc comment is empty
      75 | ERROR   | Doc comment is empty
     103 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
     306 | ERROR   | Doc comment is empty
     356 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
     369 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     373 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     376 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    ---------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/src/Form/RoleForceForm.php
    -------------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
    -------------------------------------------------------------------------------------------------------------------
      13 | ERROR   | Doc comment is empty
      65 | ERROR   | Doc comment is empty
      72 | ERROR   | Doc comment is empty
     117 | ERROR   | Doc comment is empty
     147 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     150 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    -------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/src/Entity/User/ForcePasswordChangeRoleListBuilder.php
    -----------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------------------------------------------------
      7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\StringTranslation\StringTranslationTrait.
     10 | ERROR | [ ] Doc comment is empty
    -----------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/src/Mapper/ForcePasswordChangeMapper.php
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------------------------------------------
       7 | ERROR   | Doc comment is empty
     150 | WARNING | Unused variable $alias.
    ---------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/src/Mapper/ForcePasswordChangeMapperInterface.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 6 ERRORS AND 4 WARNINGS AFFECTING 10 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
       5 | ERROR   | Doc comment is empty
      45 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
      58 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
      67 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
      81 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
     106 | WARNING | Line exceeds 80 characters; contains 96 characters
     119 | WARNING | Line exceeds 80 characters; contains 99 characters
     152 | WARNING | Line exceeds 80 characters; contains 84 characters
     161 | WARNING | Line exceeds 80 characters; contains 93 characters
     171 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/src/Controller/ForcePasswordChangeControllerInterface.php
    --------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    --------------------------------------------------------------------------------------------------------------------------------------------------
      5 | ERROR | Doc comment is empty
     10 | ERROR | Doc comment is empty
     15 | ERROR | Doc comment is empty
    --------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/src/Controller/ForcePasswordChangeController.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
    -----------------------------------------------------------------------------------------------------------------------------------------
      17 | ERROR   | Doc comment is empty
     102 | ERROR   | Doc comment is empty
     116 | ERROR   | Doc comment is empty
     126 | WARNING | Role::load calls should be avoided in classes, use dependency injection instead
    -----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/src/Service/ForcePasswordChangeServiceInterface.php
    --------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 6 ERRORS AND 5 WARNINGS AFFECTING 11 LINES
    --------------------------------------------------------------------------------------------------------------------------------------------
       5 | ERROR   | Doc comment is empty
      30 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
      47 | WARNING | Line exceeds 80 characters; contains 84 characters
      60 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
      68 | WARNING | Line exceeds 80 characters; contains 85 characters
      84 | ERROR   | Missing parameter type
      87 | ERROR   | Missing parameter type
     123 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
     185 | WARNING | Line exceeds 80 characters; contains 85 characters
     195 | WARNING | Line exceeds 80 characters; contains 93 characters
     205 | WARNING | Line exceeds 80 characters; contains 93 characters
    --------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/src/Service/ForcePasswordChangeRedirectMiddleware.php
    ----------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------------
      8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Symfony\Component\HttpFoundation\RedirectResponse.
     42 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    ----------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/src/Service/ForcePasswordChangeService.php
    -----------------------------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 4 LINES
    -----------------------------------------------------------------------------------------------------------------------------------
      11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\user\Entity\User.
      13 | ERROR | [ ] Doc comment is empty
     300 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
     314 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
    -----------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/src/EventSubscriber/ForcePasswordChangeEventSubscriber.php
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------------------------
     16 | ERROR | Doc comment is empty
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/force_password_change/src/EventSubscriber/ForcePasswordChangeConfigPostUpdateSubscriber.php
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigCrudEvent.
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 834ms; Memory: 12MB
    
    āžœ  contrib git:(main) āœ—

    Thank you.

  • Status changed to Needs review 29 days ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    This issue is for avoiding to use t() in classes, where possible, not to fix all the warnings/errors reported by PHP_CodeSniffer.

Production build 0.69.0 2024