Minor phpcs issues

Created on 6 July 2023, over 1 year ago

Problem/Motivation

PHPCS gives the errors as below:

C:\xampp\htdocs\backendassignment\web\modules\contrib>phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig term_condition

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\term_condition\src\Plugin\Condition\Term.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\backendassignment\web\modules\contrib\term_condition\term_condition.install
-------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 55 | ERROR | [x] Expected 1 space before "="; 0 found
 67 | ERROR | [x] Use "elseif" in place of "else if"
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------

Time: 829ms; Memory: 6MB

Steps to reproduce

Run the phpcs command on the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Needs work

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia sidharth_soman Bangalore

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

Merge Requests

Comments & Activities

  • Issue created by @sidharth_soman
  • Merge request !8Fixed phpcs issues. โ†’ (Open) created by sidharth_soman
  • Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    Waiting for branch to pass
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sidharth_soman Bangalore
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Yashaswi18

    Hello, after checking out to the branch '3372964-minor-phpcs-issues' and running the command phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig term_condition, I found no errors or warnings remaining.

  • Status changed to RTBC 12 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines clarkssquared

    Hi

    I also confirm that there's no PHPCS issues after applying MR !8

    โžœ  term_condition git:(2.0.x) curl https://git.drupalcode.org/project/term_condition/-/merge_requests/8.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   957    0   957    0     0   1698      0 --:--:-- --:--:-- --:--:--  1718
    patching file term_condition.install
    โžœ  term_condition git:(2.0.x) โœ— ..
    โžœ  contrib git:(master) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml term_condition  
    โžœ  contrib git:(master) โœ— 
    
    
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada Liam Morland Ontario, CA ๐Ÿ‡จ๐Ÿ‡ฆ

    liam morland โ†’ made their first commit to this issueโ€™s fork.

  • Pipeline finished with Success
    3 months ago
    Total: 133s
    #340347
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada Liam Morland Ontario, CA ๐Ÿ‡จ๐Ÿ‡ฆ

    Coding standards tests are passing.

Production build 0.71.5 2024