Problem/Motivation
vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth/src/EventSubscriber/SimplesamlExternalauthSubscriber.php
---------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\simplesamlphp_auth\Service\SimplesamlphpDrupalAuth.
---------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth/src/EventSubscriber/SimplesamlSubscriber.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Routing\RouteMatchInterface.
127 | ERROR | [ ] Public method name "SimplesamlSubscriber::login_directly_with_external_IdP" is not in lowerCamel format
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth/src/Service/SimplesamlphpDrupalAuth.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 5 LINES
--------------------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Messenger\MessengerInterface.
255 | ERROR | [x] Each index in a multi-line array must be on a new line
350 | ERROR | [x] list(...) is forbidden, use [...] instead.
375 | ERROR | [x] list(...) is forbidden, use [...] instead.
400 | ERROR | [x] list(...) is forbidden, use [...] instead.
400 | WARNING | [ ] Unused variable $before.
--------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth/src/Service/SimplesamlphpAuthManager.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\StringTranslation\StringTranslationTrait.
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth/src/Controller/SimplesamlphpAuthController.php
------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------
16 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Symfony\Component\DependencyInjection\ContainerInterface.
163 | WARNING | [x] '@TODO probably a more symfony way of doing this' should match the format '@todo Fix problem X here.'
196 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
213 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth/src/Plugin/Block/SimplesamlphpAuthBlock.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Plugin\ContainerFactoryPluginInterface.
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth/src/Exception/SimplesamlphpAttributeException.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------
7 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth/tests/src/Functional/SimplesamlphpAuthTest.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------------------------------------
76 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
81 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
91 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
96 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
105 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth/tests/src/Unit/Service/SimplesamlphpDrupalAuthTest.php
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\simplesamlphp_auth\Service\SimplesamlphpDrupalAuth.
488 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple lines
-----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth/tests/src/Unit/Service/SimplesamlphpAuthManagerTest.php
----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\simplesamlphp_auth\Service\SimplesamlphpAuthManager.
----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.install
------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Session\AccountInterface.
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/drupal_cms/drupal9/web/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module
------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
35 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
Time: 478ms; Memory: 12MB
Comments
Comment #2
prasaddeole commentedComment #3
prasaddeole commentedComment #4
prasaddeole commentedIssue summary updated and included DrupalPractice.
Comment #5
prasaddeole commentedUpdated patch as per the updated issue.
Comment #7
prasaddeole commentedComment #11
nitin_lamaPlease review the MR.
Comment #12
nikolay shapovalov commentedSimmilar changes made in #3401289: Fix linting errors on gitlab CI for 4.x branch. Not sure if we need to close this issue.
Comment #13
nikolay shapovalov commentedComment #14
a.aaronjake commentedHi @nitin_lama,
Applied the latest changes committed on MR!29, it was applied successfully and confirmed no errors reported.
Will now move this to RTBC
Thanks,
Jake