Fix the issues reported by phpcs

Created on 11 April 2023, about 1 year ago
Updated 4 October 2023, 9 months ago

Problem/Motivation

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\ordered_list-3353411\css\ordered_list.css
-----------------------------------------------------------------------------------------------------
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\ordered_list-3353411\ordered_list.install
-----------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
6 | ERROR | [x] There must be exactly one blank line after the file comment
12 | ERROR | [x] Expected 1 blank line before function; 2 found
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\ordered_list-3353411\ordered_list.module
------------------------------------------------------------------------------------------------------------------------
FOUND 24 ERRORS AND 3 WARNINGS AFFECTING 27 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
6 | ERROR | [x] There must be exactly one blank line after the file comment
12 | ERROR | [x] Expected 1 blank line before function; 2 found
20 | ERROR | [x] Expected 1 blank line after function; 2 found
32 | ERROR | [x] Expected 1 blank line after function; 2 found
36 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",,
| | "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar()
| | for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
53 | ERROR | [x] Expected 1 blank line after function; 2 found
67 | ERROR | [x] Expected 1 blank line after function; 2 found
80 | WARNING | [ ] Only string literals should be passed to t() where possible
109 | ERROR | [x] Use null coalesce operator instead of ternary operator.
130 | ERROR | [x] Expected 1 blank line after function; 2 found
137 | WARNING | [ ] Only string literals should be passed to t() where possible
141 | ERROR | [x] Expected 1 blank line after function; 2 found
162 | ERROR | [x] Expected 1 blank line after function; 2 found
213 | ERROR | [x] Expected 1 blank line after function; 2 found
271 | ERROR | [x] Expected 1 blank line after function; 2 found
279 | ERROR | [x] Expected 1 blank line after function; 2 found
308 | ERROR | [x] Expected 1 blank line after function; 2 found
333 | ERROR | [x] Expected 1 blank line after function; 2 found
347 | ERROR | [x] Expected 1 blank line after function; 2 found
365 | ERROR | [x] Expected 1 blank line after function; 2 found
376 | ERROR | [x] Expected 1 blank line after function; 2 found
392 | ERROR | [x] Expected 1 blank line after function; 2 found
414 | ERROR | [x] Expected 1 blank line after function; 2 found
427 | ERROR | [x] Expected 1 blank line after function; 2 found
439 | ERROR | [x] Use null coalesce operator instead of ternary operator.
447 | ERROR | [x] Expected 1 blank line after function; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\ordered_list-3353411\README.txt
-------------------------------------------------------------------------------------------
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
-------------------------------------------------------------------------------------------

Time: 1.66 secs; Memory: 6MB

Steps to reproduce

Run the below phpcs command on the module.
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/ordered_list

Proposed resolution

Fix the issue found by phpcs

📌 Task
Status

RTBC

Version

1.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

Production build 0.69.0 2024