Problem/Motivation

/web/modules/contrib/keycloak/src/Plugin/OpenIDConnectClient/Keycloak.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------
474 | ERROR | [x] Expected 1 space before opening brace; found 2
638 | ERROR | [x] Expected newline after closing brace
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

/web/modules/contrib/keycloak/src/EventSubscriber/KeycloakRequestSubscriber.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
39 | ERROR | [x] Expected "\Drupal\openid_connect\OpenIDConnectStateToken" but found "\Drupal\openid_connect\OpenIDConnectStateToken;" for
| | @var tag in member variable comment
161 | ERROR | [ ] The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines

Steps to reproduce

vendor/bin/phpcs --standard="Drupal,DrupalPractice" -n --extensions="php,module,inc,install,test,profile,theme,yml" web/modules/contrib/keycloak/

Issue fork keycloak-3359028

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

Nishant created an issue. See original summary.

nishant’s picture

Created patch, Please review.

nishant’s picture

Status: Active » Needs review
shiv_sharma’s picture

Status: Needs review » Needs work

@nishant reviewed the code but seems the is indentation issue

public static function getSubscribedEvents() {
    $events[KernelEvents::REQUEST][] = ['onKernelRequestCheckKeycloakRedirect',
      35
    ];

It should be look like this.

public static function getSubscribedEvents() {
    $events[KernelEvents::REQUEST][] = [
      'onKernelRequestCheckKeycloakRedirect', 35
    ];
nishant’s picture

Thanks @Shiv_Sharma.

I have updated MR.

nishant’s picture

Status: Needs work » Needs review
avpaderno’s picture

Category: Bug report » Task
Priority: Normal » Minor
shiv_sharma’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new58.95 KB

@nishant seems no new error from PHPCS.
attached screenshot for reference

bramdriesen’s picture

Normally I don't give credit for such automated fix, but I assume that this is a "intro to contributing" kind of thing, and since the review actually was a proper review, I'll give credit this time.

  • BramDriesen committed 84ce41df on 2.2.x authored by Nishant
    Issue #3359028 by Nishant, Shiv_Sharma: Fix the issues reported by phpcs
    
bramdriesen’s picture

Status: Reviewed & tested by the community » Fixed
nishant’s picture

Category: Task » Bug report
Priority: Minor » Normal
Status: Fixed » Needs review

Thanks @BramDriesen

nishant’s picture

Status: Needs review » Fixed
avpaderno’s picture

Assigned: nishant » Unassigned
Category: Bug report » Task
Priority: Normal » Minor
bramdriesen’s picture

Giving credit to @apaderno as well for keeping issues in their correct state 😉

Status: Fixed » Closed (fixed)

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