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
Command icon 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

PrasadDeole created an issue. See original summary.

prasaddeole’s picture

StatusFileSize
new12.74 KB
prasaddeole’s picture

Status: Active » Needs review
prasaddeole’s picture

Issue summary: View changes

Issue summary updated and included DrupalPractice.

prasaddeole’s picture

StatusFileSize
new18.15 KB

Updated patch as per the updated issue.

Status: Needs review » Needs work

The last submitted patch, 5: coding-standard-3382137-5.patch, failed testing. View results

prasaddeole’s picture

Issue summary: View changes

zniki.ru made their first commit to this issue’s fork.

nitin_lama made their first commit to this issue’s fork.

nitin_lama’s picture

Status: Needs work » Needs review

Please review the MR.

nikolay shapovalov’s picture

Simmilar changes made in #3401289: Fix linting errors on gitlab CI for 4.x branch. Not sure if we need to close this issue.

nikolay shapovalov’s picture

Assigned: prasaddeole » Unassigned
a.aaronjake’s picture

Status: Needs review » Reviewed & tested by the community

Hi @nitin_lama,

Applied the latest changes committed on MR!29, it was applied successfully and confirmed no errors reported.

simplesamlphp_auth git:(8.x-3.x) curl https://git.drupalcode.org/project/simplesamlphp_auth/-/merge_requests/29.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20722    0 20722    0     0  52102      0 --:--:-- --:--:-- --:--:-- 53545
patching file simplesamlphp_auth.api.php
patching file simplesamlphp_auth.install
patching file simplesamlphp_auth.module
patching file src/Controller/SimplesamlphpAuthController.php
patching file src/EventSubscriber/SimplesamlExternalauthSubscriber.php
patching file src/EventSubscriber/SimplesamlSubscriber.php
patching file src/Exception/SimplesamlphpAttributeException.php
patching file src/Plugin/Block/SimplesamlphpAuthBlock.php
patching file src/Service/SimplesamlphpAuthManager.php
patching file src/Service/SimplesamlphpDrupalAuth.php
patching file tests/src/Functional/SimplesamlphpAuthTest.php
patching file tests/src/Unit/Service/SimplesamlphpAuthManagerTest.php
patching file tests/src/Unit/Service/SimplesamlphpDrupalAuthTest.php
➜  simplesamlphp_auth git:(8.x-3.x) ✗ ..
➜  contrib git:(master) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig simplesamlphp_auth
➜  contrib git:(master) ✗

Will now move this to RTBC

Thanks,
Jake