Problem/Motivation

FILE: /var/www/html/web/modules/custom/openid-connect/tests/src/Unit/OpenIDConnectTest.php
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
  3 | ERROR | [x] Expected strict_types=1, found strict_types = 1. (SlevomatCodingStandard.TypeHints.DeclareStrictTypes.IncorrectStrictTypesFormat)
 24 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\openid_connect\OpenIDConnect.
    |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/openid-connect/tests/src/Unit/Entity/OpenIDConnectClientEntityTest.php
---------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------------
 3 | ERROR | [x] Expected strict_types=1, found strict_types = 1. (SlevomatCodingStandard.TypeHints.DeclareStrictTypes.IncorrectStrictTypesFormat)
---------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/openid-connect/tests/src/Unit/OpenIdConnectClaimsTest.php
---------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------------
 3 | ERROR | [x] Expected strict_types=1, found strict_types = 1. (SlevomatCodingStandard.TypeHints.DeclareStrictTypes.IncorrectStrictTypesFormat)
---------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/openid-connect/tests/src/Unit/OpenIDConnectStateTokenTest.php
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
 3 | ERROR | [x] Expected strict_types=1, found strict_types = 1. (SlevomatCodingStandard.TypeHints.DeclareStrictTypes.IncorrectStrictTypesFormat)
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\openid_connect\OpenIDConnectStateToken.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/openid-connect/tests/src/Unit/OpenIdConnectSessionTest.php
---------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------------
 3 | ERROR | [x] Expected strict_types=1, found strict_types = 1. (SlevomatCodingStandard.TypeHints.DeclareStrictTypes.IncorrectStrictTypesFormat)
---------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/openid-connect/src/OpenIDConnectAutoDiscover.php
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Serialization\Json.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/openid-connect/src/Entity/OpenIDConnectClientEntity.php
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\openid_connect\Plugin\OpenIDConnectClientCollection.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/openid-connect/src/Plugin/OpenIDConnectClientBase.php
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
 24 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Datetime\TimeInterface.
    |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/openid-connect/src/Controller/OpenIDConnectRedirectController.php
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
 21 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\openid_connect\OpenIDConnect.
    |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------------------

Time: 551ms; Memory: 10MB


PHP CODE SNIFFER REPORT SUMMARY
----------------------------------------------------------------------------------------------------------------------------
FILE                                                                                                        ERRORS  WARNINGS
----------------------------------------------------------------------------------------------------------------------------
/var/www/html/web/modules/custom/openid-connect/src/OpenIDConnectAutoDiscover.php                           1       0
/var/www/html/web/modules/custom/openid-connect/src/Controller/OpenIDConnectRedirectController.php          1       0
/var/www/html/web/modules/custom/openid-connect/src/Entity/OpenIDConnectClientEntity.php                    1       0
/var/www/html/web/modules/custom/openid-connect/src/Plugin/OpenIDConnectClientBase.php                      1       0
/var/www/html/web/modules/custom/openid-connect/tests/src/Unit/OpenIdConnectClaimsTest.php                  1       0
/var/www/html/web/modules/custom/openid-connect/tests/src/Unit/OpenIdConnectSessionTest.php                 1       0
/var/www/html/web/modules/custom/openid-connect/tests/src/Unit/OpenIDConnectStateTokenTest.php              2       0
/var/www/html/web/modules/custom/openid-connect/tests/src/Unit/OpenIDConnectTest.php                        2       0
/var/www/html/web/modules/custom/openid-connect/tests/src/Unit/Entity/OpenIDConnectClientEntityTest.php     1       0
----------------------------------------------------------------------------------------------------------------------------
A TOTAL OF 11 ERRORS AND 0 WARNINGS WERE FOUND IN 9 FILES
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX 11 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------


PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
--------------------------------------------------------------------------------------------
    SOURCE                                                                             COUNT
--------------------------------------------------------------------------------------------
[x] SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses  6
[x] SlevomatCodingStandard.TypeHints.DeclareStrictTypes.IncorrectStrictTypesFormat     5
--------------------------------------------------------------------------------------------
A TOTAL OF 11 SNIFF VIOLATIONS WERE FOUND IN 2 SOURCES
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SOURCES AUTOMATICALLY (11 VIOLATIONS IN TOTAL)
--------------------------------------------------------------------------------------------
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

chrisck created an issue. See original summary.

chrisck’s picture

Status: Active » Needs review
clarkssquared’s picture

Status: Needs review » Reviewed & tested by the community

Hi

I applied your MR !97 and I confirmed that there are no PHPCS issues after apllying the MR

➜  openid_connect git:(3.x) curl https://git.drupalcode.org/project/openid_connect/-/merge_requests/97.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6252    0  6252    0     0  12486      0 --:--:-- --:--:-- --:--:-- 12630
patching file 'src/Controller/OpenIDConnectRedirectController.php'
patching file 'src/Entity/OpenIDConnectClientEntity.php'
patching file 'src/OpenIDConnectAutoDiscover.php'
patching file 'src/Plugin/OpenIDConnectClientBase.php'
patching file 'tests/src/Unit/OpenIDConnectStateTokenTest.php'
patching file 'tests/src/Unit/OpenIDConnectTest.php'
➜  openid_connect git:(3.x) ✗ ..
➜  contrib git:(master) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml openid_connect 
➜  contrib git:(master) ✗ 

solideogloria’s picture

Issue summary: View changes
solideogloria’s picture

Status: Reviewed & tested by the community » Needs work

The MR as-is doesn't fix SlevomatCodingStandard.TypeHints.DeclareStrictTypes.IncorrectStrictTypesFormat

solideogloria’s picture

Status: Needs work » Needs review

jcnventura’s picture

Sorry for closing the MR, but it is easier to just run phpcs locally and fix all of the current coding standards, even the ones not reported here.

  • jcnventura committed d10926f8 on 3.x
    Issue #3418272 by chrisck, solideogloria, clarkssquared, jcnventura: Fix...
jcnventura’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.