$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml redirect_after_logout/
FILE: ...ion\web\modules\contrib\redirect_after_logout\redirect_after_logout.module
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
21 | ERROR | [x] Case breaking statement indented incorrectly; expected 6
| | spaces, found 5
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...edirect_after_logout\src\EventSubscriber\RedirectAfterLogoutSubscriber.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------
10 | WARNING | [x] Unused use statement
41 | ERROR | [ ] Expected type hint "ResponseEvent"; found
| | "FilterResponseEvent" for $event
44 | ERROR | [x] A unary operator statement must not be followed by a space
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...\modules\contrib\redirect_after_logout\src\Form\RedirectLogoutSettings.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
21 | WARNING | [ ] The class short comment should describe what the class
| | does and not simply repeat the class name
47 | ERROR | [ ] Missing @var tag in member variable comment
160 | WARNING | [ ] Line exceeds 80 characters; contains 97 characters
191 | ERROR | [x] Expected 1 blank line after function; 0 found
192 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...odules\contrib\redirect_after_logout\tests\src\Functional\SettingsTest.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
16 | ERROR | [ ] Missing member variable doc comment
141 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
147 | ERROR | [x] Expected 1 blank line after function; 0 found
148 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...s\contrib\redirect_after_logout\tests\src\Functional\SettingsTestToken.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
12 | ERROR | [ ] Missing member variable doc comment
29 | ERROR | [x] Expected 1 blank line after function; 0 found
30 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...es\contrib\redirect_after_logout\tests\src\Functional\SimpleLogoutTest.php
--------------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------------
12 | ERROR | [ ] Missing member variable doc comment
26 | ERROR | [x] Inline comments must start with a capital letter
26 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
34 | ERROR | [x] Inline comments must start with a capital letter
34 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
42 | ERROR | [x] Inline comments must start with a capital letter
42 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
48 | ERROR | [x] Expected 1 blank line after function; 0 found
49 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...eb\modules\contrib\redirect_after_logout\tests\src\Functional\TestBase.php
--------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 10 LINES
--------------------------------------------------------------------------------
11 | ERROR | [x] Doc comment short description must start with a capital
| | letter
27 | ERROR | [ ] Missing member variable doc comment
29 | ERROR | [ ] Missing short description in doc comment
32 | ERROR | [ ] Class property $admin_user should use lowerCamel naming
| | without underscores
34 | ERROR | [ ] Missing short description in doc comment
37 | ERROR | [ ] Class property $authenticated_user should use lowerCamel
| | naming without underscores
39 | ERROR | [ ] Missing short description in doc comment
42 | ERROR | [ ] Class property $regular_user should use lowerCamel naming
| | without underscores
72 | ERROR | [x] Expected 1 blank line after function; 0 found
73 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...les\contrib\redirect_after_logout\tests\src\Functional\TokenLogoutTest.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
16 | ERROR | [ ] Missing member variable doc comment
45 | ERROR | [x] Expected 1 blank line after function; 0 found
46 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 387ms; Memory: 10MB
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | interdiff-3293261_20-22.txt | 3.65 KB | nevergone |
| #23 | drupal-coding-standard-issue-3293261-22.patch | 13.91 KB | nevergone |
| #8 | interdiff_2-8.txt | 5.57 KB | mrinalini9 |
| #8 | drupal-coding-standard-issue-3293261-8.patch | 11.48 KB | mrinalini9 |
| #4 | Screenshot from 2022-07-05 12-41-35.png | 25.94 KB | nitin_lama |
Issue fork redirect_after_logout-3293261
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
rakhi soni commentedI have created a patch to fix the issue of "Drupal Coding Standard",, please review.
Thanks & Regards
Rakhi Soni,,
Comment #3
shamir.vs commentedHi @rakhi-soni, There are a few more errors. can you please check
FILE: /home/shamir/Projects/drupal9/drupal-contributions-9.x/web/modules/contrib/redirect_after_logout/redirect_after_logout.module
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
21 | ERROR | [x] Case breaking statement indented incorrectly; expected 6 spaces, found 5
30 | ERROR | [ ] The $_GET super global must not be accessed directly; inject the request_stack service and use
| | $stack->getCurrentRequest()->query->get('logout-message') instead
36 | ERROR | [ ] The $_GET super global must not be accessed directly; inject the request_stack service and use
| | $stack->getCurrentRequest()->query->get('logout-message') instead
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /home/shamir/Projects/drupal9/drupal-contributions-9.x/web/modules/contrib/redirect_after_logout/redirect_after_logout.info.yml
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------------------------------
FILE: /home/shamir/Projects/drupal9/drupal-contributions-9.x/web/modules/contrib/redirect_after_logout/src/Form/RedirectLogoutSettings.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
18 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /home/shamir/Projects/drupal9/drupal-contributions-9.x/web/modules/contrib/redirect_after_logout/src/EventSubscriber/RedirectAfterLogoutSubscriber.php
------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------
10 | WARNING | [x] Unused use statement
41 | ERROR | [ ] Expected type hint "ResponseEvent"; found "FilterResponseEvent" for $event
43 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 5
------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------
Comment #4
nitin_lamaPatch #2 applied cleanly. #3 @shamir.vs No fixable errors were found after applying the patch.
Comment #5
nitin_lamaComment #6
nevergonePlease wait, I will be there shortly.
Comment #7
nevergoneThe patch is #3293261-2: Drupal Coding Standard Issue As per 'phpcs --standard=Drupal' is wrong. Please fix it.
For example:
However:
$this->regular_user = $this->drupalCreateUser(['redirect user after logout']);Comment #8
mrinalini9 commentedUpdated patch #2 by addressing #7, please review it.
Comment #9
atul_ghate commentedHi,
I will review this patch
Comment #10
nevergoneBut tests/src/Functional/TestBase.php, line 58:
$this->admin_user = $this->drupalCreateUser(['administer site configuration']);phpcs static analyzer is ok, but drupal-check:
Check deprecations: (-d)
Check code analysis and deprecations: (-ad)
Comment #11
atul_ghate commentedOn my local machine, patch #8 has resolved all coding standard issues
Comment #12
nevergone@atul ghate:
Ok, I agree. But phpcs is faster and less precise. Drupal-check (based of phpstan) is better code analysis tool. See #3293261-10: Drupal Coding Standard Issue As per 'phpcs --standard=Drupal' comment.
The tests is coudn't run:
Comment #13
nevergonePlease update code, see: #3289275: Automated Drupal 10 compatibility fixes
Comment #15
anoopsingh92Hi,
I am checking this issue.
Thanks
Comment #16
anoopsingh92Hello,
Please review this patch.
Thanks
Comment #17
anoopsingh92Comment #18
nevergone@anoopsingh92
Thanks the patch!
The "Testsettingsformconfiguration" what does it mean?
Comment #19
anoopsingh92Hello @nevergone,
I really don't know from where it came probably some issue with the PHP coder.
I am uploading another Patch.
Thanks
Comment #20
anoopsingh92Hi,
Please review this patch.
Thanks
Comment #21
nevergoneWhy rename the variables?
Comment #23
nevergonePatch re-rolled and fixed.
Thanks the contribution!