Fix the coding standards:

FILE: C:\Users\Navyaa\Desktop\social_auth_strava\src\StravaAuthManager.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
--------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found
    |         |     "\r\n"
  6 | WARNING | [x] Unused use statement
 24 | ERROR   | [x] Data types in @var tags need to be fully namespaced
 70 | ERROR   | [x] Expected 1 blank line after function; 0 found
 71 | ERROR   | [x] The closing brace for the class must have an empty line
    |         |     before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 1.54 secs; Memory: 8MB
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

sahil2006 created an issue. See original summary.

sahil06’s picture

urvashi_vora’s picture

Assigned: Unassigned » urvashi_vora
urvashi_vora’s picture

Assigned: urvashi_vora » Unassigned
Status: Needs work » Needs review
StatusFileSize
new7.03 KB

Hi,

Please review this patch.

Thanks

dharti patel’s picture

Assigned: Unassigned » dharti patel

Hello,

I'll review this patch.

Thanks!

avpaderno’s picture

Title: Fix the Coding Standards » Fix the issues reported by phpcs
dharti patel’s picture

Assigned: dharti patel » Unassigned
StatusFileSize
new7.44 KB

Hello,

Reviewed the #4 patch but after applying the patch facing the below errors.

FILE: /home/drupal-9.5/drupal/social_auth_strava/src/StravaAuthManager.php
-------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
 49 | ERROR | The $_GET super global must not be accessed directly; inject the request_stack service and use
    |       | $stack->getCurrentRequest()->query->get('code') instead
-------------------------------------------------------------------------------------------


FILE: /home/drupal-9.5/drupal/social_auth_strava/src/Controller/StravaAuthController.php
-------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
 90 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------

Resolved the above issues and create a new patch for the same.
Please review the patch.

Thanks!

avpaderno’s picture

Issue tags: +Coding standards

  • nginex committed 0369550a on 2.0.x
    Issues #3108965, #3141761, #3109008, #3061660, #3001108
    
    List of the...
nginex’s picture

Assigned: Unassigned » nginex
nginex’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Assigned: nginex » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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