$ phpcs --standard=Drupal DiscordAuthManager.php

FILE: ...rs\Navyaa\Desktop\social_auth_discord\src\DiscordAuthManager.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but
   |       |     found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

$ phpcs --standard=DrupalPractice .

FILE: ...rs\Navyaa\Desktop\social_auth_discord\src\DiscordAuthManager.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 113 | ERROR | The $_GET super global must not be accessed directly;
     |       | inject the request.stack service and use
     |       | $stack->getCurrentRequest()->query->get('code')
     |       | instead
----------------------------------------------------------------------


FILE: ...Desktop\social_auth_discord\src\Form\DiscordAuthSettingsForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 145 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
----------------------------------------------------------------------

Time: 142ms; Memory: 6MB

Comments

sahil2006 created an issue. See original summary.

sahil06’s picture

Issue tags: +social auth
nishantghetiya’s picture

Assigned: Unassigned » nishantghetiya
nishantghetiya’s picture

Assigned: nishantghetiya » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.64 KB

Hi @sahil06,

Please review the following Patch for resolve coding standard issues.

Thanks

sahil06’s picture

Patch applies cleanly

naresh_bavaskar’s picture

Assigned: Unassigned » naresh_bavaskar
Status: Needs review » Needs work

Minor coding standards need to be fixed

naresh_bavaskar’s picture

Status: Needs work » Needs review
StatusFileSize
new3 KB
new464 bytes

Please check attached patch

naresh_bavaskar’s picture

Assigned: naresh_bavaskar » Unassigned
kishor_kolekar’s picture

Status: Needs review » Reviewed & tested by the community

hi @naresh_bavaskar

patch #7 LGTM + 1 RTBC

Thanks!

gvso’s picture

Title: Fix the Coding Standards » Fix coding standard violations
Version: » 8.x-2.x-dev
Status: Reviewed & tested by the community » Fixed
Issue tags: -social auth

Thanks everyone! Coding standard violations were taken care at #3110641: Refactor base code

Status: Fixed » Closed (fixed)

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