Fix the issues reported by PHPCS

Created on 27 March 2023, over 1 year ago
Updated 21 April 2023, over 1 year ago

Problem/Motivation

Fix the issues reported by PHP Code Sniffer

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig flood_control/

Proposed resolution

Fix all the issues:
FILE: /var/www/html/contribution/d10_uv/web/modules/contrib/flood_control/README.md
-----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------
61 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------

FILE: ..._uv/web/modules/contrib/flood_control/tests/src/Functional/FloodControlLoginTest.php
------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------
12 | ERROR | [ ] Class name doesn't match filename; expected "class
| | FloodControlLoginTest"
66 | ERROR | [x] Expected 1 space after IF keyword; 0 found
------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------

FILE: ...uv/web/modules/contrib/flood_control/tests/src/Functional/FloodControlUiPageTest.php
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------
97 | WARNING | Line exceeds 80 characters; contains 84 characters
------------------------------------------------------------------------------------------

Time: 995ms; Memory: 10MB

📌 Task
Status

Fixed

Version

2.3

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

Production build 0.71.5 2024