Minor phpcs issues

Created on 6 July 2023, 12 months ago
Updated 10 March 2024, 4 months 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

RTBC

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

Comments & Activities

  • Issue created by @sidharth_soman
  • Open on Drupal.org ā†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 12 months ago
    Waiting for branch to pass
  • @sidharth_soman opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review 12 months 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 4 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) āœ— 
    
    
Production build 0.69.0 2024