PHPCS Coding Standard

Created on 3 January 2023, almost 2 years ago
Updated 25 April 2023, over 1 year ago

Problem/Motivation

The module does not follow proper 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,yaml,twig active_role_switch/

Proposed resolution

Resolve all issues reported by PHP code sniffer

๐Ÿ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia urvashi_vora Madhya Pradesh, India

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

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia urvashi_vora Madhya Pradesh, India

    Since, previous patch was adding 5 whitespaces, I have removed them in the new patch.

    Also, providing interdiff file.

    Thanks

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Anmol_Specbee

    Hey @urvashi_vora,

    The majority of the errors are fixed but found the following error after applying your patch:-

    FILE: C:\xampp\htdocs\sandboxD9\modules\contrib\active_role_switch\src\Form\ActiveRoleConfigForm.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
    ----------------------------------------------------------------------------------------------------
    
    
    FILE: C:\xampp\htdocs\sandboxD9\modules\contrib\active_role_switch\src\Form\ActiveRoleSwitchForm.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
    ----------------------------------------------------------------------------------------------------
    
    
    FILE: C:\xampp\htdocs\sandboxD9\modules\contrib\active_role_switch\src\Plugin\Block\ActiveRolesSwitchBlock.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
    --------------------------------------------------------------------------------------------------------------
    
  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia keshavv India

    keshav.k โ†’ made their first commit to this issueโ€™s fork.

  • @keshavk opened merge request.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia keshavv India
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Anmol_Specbee

    The patch is working as expected. Moving to RTBC.

  • Status changed to RTBC over 1 year ago
Production build 0.71.5 2024