The followings errors and warnings has been from PHPCS reported
FILE: /externalauth_gitlab/src/Form/SettingsForm.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------------
10 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
24 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
54 | WARNING | Possible useless method overriding detected
63 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------
FILE: /externalauth_gitlab/src/Controller/LoginController.php
----------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 6 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
1 | ERROR | [x] The open comment tag must be the only content on the line
1 | ERROR | [ ] Missing short description in doc comment
19 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
66 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
68 | WARNING | [ ] Exceptions should not be translated
72 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
100 | WARNING | [ ] Unused variable $saved_state.
171 | WARNING | [ ] Exceptions should not be translated
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------
Steps to reproduce
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig "module_name"
Proposed resolution
Resolve the PHPCS issues.
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #3
solimanharkas commentedI fixed all PHPCS errors, Please review my merge request. Thanks
Comment #4
atul_ghate commentedI will review this patch.
Comment #5
atul_ghate commentedReviewing and applying #3 patch resolved most PHPCS issues, but still some remain, so I am providing a new patch to resolve all PHPCS issues.
Comment #6
akram khanReviewed patch #5 it's apply cleanly and remove all PHPCS errors. Added SS for reference
Comment #7
avpadernoThe issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, report which command has been used, which arguments have been used, and which report that command shown.
Comment #9
stmh commentedthanks for the patches. Will do some tests before creating a new release.
Comment #10
indrapatil commentedComment #11
stmh commented