fix the issue reported by phpcs

Created on 21 July 2023, over 1 year ago
Updated 9 July 2024, 5 months ago

Problem/Motivation

Getting following error/warnings:

FILE: D:\xampp\htdocs\project_10\web\modules\contrib\sdc_styleguide\README.md
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
 29 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: D:\xampp\htdocs\project_10\web\modules\contrib\sdc_styleguide\sdc_styleguide.module
-----------------------------------------------------------------------------------------
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: D:\xampp\htdocs\project_10\web\modules\contrib\sdc_styleguide\src\Form\SDCExplorerForm.php
------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------
   1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
   1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  22 | ERROR | [x] Missing function doc comment
 124 | ERROR | [x] Concat operator must be surrounded by a single space
 147 | ERROR | [x] Missing function doc comment
 151 | ERROR | [x] Missing function doc comment
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------

Steps to reproduce

Run following command:

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml sdc_styleguide/

Proposed resolution

Above error/warnings need to be fixed.

๐Ÿ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia arti_parmar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024