fix issue reported by phpcs

Created on 29 June 2023, over 1 year ago
Updated 30 June 2023, over 1 year ago

Fix all the issues reported by PHPCS for Drupal and DrupalPractice Coding Standards

Steps to reproduce
Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig social_auth_modal/

Proposed resolution
Fixing all issues mentioned:
FILE: social_auth_modal/js/modal-close.js
-------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
19 | ERROR | [x] Space before opening parenthesis of function call prohibited
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

FILE: social_auth_modal/js/modal-open.js
-------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 5 LINES
-------------------------------------------------------------------------------
11 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
19 | ERROR | [x] Expected 1 space after "?"; 0 found
19 | ERROR | [x] Expected 1 space before "?"; 0 found
20 | ERROR | [x] Expected 1 space after "?"; 0 found
20 | ERROR | [x] Expected 1 space before "?"; 0 found
33 | ERROR | [x] Space before opening parenthesis of function call prohibited
40 | ERROR | [x] Expected 1 space before "!="; 2 found
40 | ERROR | [x] Expected 1 space before ":"; 2 found
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India vishal365365

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

  • Issue created by @vishal365365
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India vishal365365

    issues fixed
    phpcbf --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig social_auth_modal/

    PHPCBF RESULT SUMMARY
    ----------------------------------------------------------------------
    FILE FIXED REMAINING
    ----------------------------------------------------------------------
    social_auth_modal/js/modal-close.js 2 0
    social_auth_modal/js/modal-open.js 8 0
    ----------------------------------------------------------------------
    A TOTAL OF 10 ERRORS WERE FIXED IN 2 FILES
    ----------------------------------------------------------------------

    Time: 186ms; Memory: 12MB

  • Status changed to RTBC over 1 year ago
  • 🇵🇭Philippines paraderojether

    Hi

    I reviewed patch #2, applied against Social Auth Modal 1.x-dev, and confirmed i fixes the issues reported by phpcs.

    I added screenshot for reference.
    Thank you.

Production build 0.71.5 2024