Fix the issues reported by phpcs

Created on 4 May 2023, over 1 year ago

Problem/Motivation

vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/http_client_log/

FILE: /var/www/html/vbd9/web/modules/contrib/http_client_log/src/HttpClientLogEntityPermissions.php
---------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------
6 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
14 | ERROR | [x] Additional blank lines found at end of doc comment
15 | ERROR | [x] Expected 1 space before opening brace; found 0
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/http_client_log/src/Form/HttpClientLogEntityTypeForm.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
10 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/http_client_log/src/HttpClientLogService.php
---------------------------------------------------------------------------------------------------------
FOUND 20 ERRORS AFFECTING 17 LINES
---------------------------------------------------------------------------------------------------------
15 | ERROR | [x] Missing class doc comment
16 | ERROR | [ ] Missing short description in doc comment
19 | ERROR | [x] Expected 1 blank line before function; 0 found
20 | ERROR | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
26 | ERROR | [x] Expected 1 blank line after function; 0 found
27 | ERROR | [x] The closing brace for the class must have an empty line before it
29 | ERROR | [x] The open comment tag must be the only content on the line
29 | ERROR | [x] Doc comment short description must be on the first line
29 | ERROR | [x] Doc comment short description must end with a full stop
31 | ERROR | [ ] Missing short description in doc comment
34 | ERROR | [x] Expected 1 blank line before function; 0 found
35 | ERROR | [x] Expected 1 space between type hint and argument "$logger"; 4 found
36 | ERROR | [x] Expected 1 space between type hint and argument "$request"; 3 found
38 | ERROR | [x] Expected 1 space between type hint and argument "$exception"; 8 found
39 | ERROR | [x] Expected 1 space between type hint and argument "$stats"; 5 found
40 | ERROR | [x] Expected 1 space between type hint and argument "$options"; 14 found
45 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
45 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
46 | ERROR | [x] Expected 1 blank line after function; 0 found
47 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/http_client_log/src/Entity/HttpClientLogEntity.php
-----------------------------------------------------------------------------------------------
FOUND 24 ERRORS AFFECTING 24 LINES
-----------------------------------------------------------------------------------------------
193 | ERROR | [x] Short array syntax must be used to define arrays
194 | ERROR | [x] Short array syntax must be used to define arrays
203 | ERROR | [x] Short array syntax must be used to define arrays
208 | ERROR | [x] Short array syntax must be used to define arrays
218 | ERROR | [x] Short array syntax must be used to define arrays
223 | ERROR | [x] Short array syntax must be used to define arrays
228 | ERROR | [x] Short array syntax must be used to define arrays
238 | ERROR | [x] Short array syntax must be used to define arrays
242 | ERROR | [x] Short array syntax must be used to define arrays
247 | ERROR | [x] Short array syntax must be used to define arrays
257 | ERROR | [x] Short array syntax must be used to define arrays
261 | ERROR | [x] Short array syntax must be used to define arrays
266 | ERROR | [x] Short array syntax must be used to define arrays
276 | ERROR | [x] Empty array declaration must have no space between the parentheses
293 | ERROR | [x] Empty array declaration must have no space between the parentheses
310 | ERROR | [x] Short array syntax must be used to define arrays
315 | ERROR | [x] Short array syntax must be used to define arrays
320 | ERROR | [x] Short array syntax must be used to define arrays
330 | ERROR | [x] Short array syntax must be used to define arrays
335 | ERROR | [x] Short array syntax must be used to define arrays
340 | ERROR | [x] Short array syntax must be used to define arrays
350 | ERROR | [x] Short array syntax must be used to define arrays
354 | ERROR | [x] Short array syntax must be used to define arrays
359 | ERROR | [x] Short array syntax must be used to define arrays
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/http_client_log/src/HttpClientLogEntityAccessControlHandler.php
------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------
74 | ERROR | Missing parameter comment
75 | ERROR | Missing parameter comment
75 | ERROR | Missing parameter type
76 | ERROR | Missing parameter comment
------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/http_client_log/src/HttpClientLogEntityListBuilder.php
---------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
29 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/http_client_log/src/Logger/Logger.php
------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
10 | ERROR | [x] Missing class doc comment
29 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
50 | ERROR | [x] There should be no white space after an opening "("
56 | ERROR | [x] Expected newline after closing brace
69 | ERROR | [x] Expected newline after closing brace
83 | ERROR | [x] Expected 1 blank line after function; 0 found
84 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/http_client_log/http_client_log.module
-----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------
26 | WARNING | Empty return statement not required here
-----------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/http_client_log/http_client_log.routing.yml
----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------
9 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------

Time: 1.05 secs; Memory: 14MB

Steps to reproduce

Proposed resolution

RUN:

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/http_client_log/

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India dineshkumarbollu

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