Fix the issues reported by PHP_CodeSniffer

Created on 24 September 2024, about 2 months ago

Problem/Motivation

FILE: modules\wsdl_docs\src\Services\SoapClientManager.php
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 22 ERRORS AND 5 WARNINGS AFFECTING 27 LINES
---------------------------------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
7 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Logger\LoggerChannelInterface.
18 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
73 | ERROR | [ ] Parameter $logger is not described in comment
76 | ERROR | [ ] Doc comment for parameter $logger_factory does not match actual variable name $messenger
115 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
116 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found
117 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found
118 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found
119 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found
120 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found
121 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found
122 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found
123 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found
138 | ERROR | [x] Array indentation error, expected 12 spaces but found 14
139 | ERROR | [x] Array closing indentation error, expected 10 spaces but found 12
154 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
155 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
156 | ERROR | [x] Array closing indentation error, expected 6 spaces but found 8
375 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
377 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
579 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
580 | ERROR | [x] Array closing indentation error, expected 6 spaces but found 8
765 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
856 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
970 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
---------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 20 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------

FILE: modules\wsdl_docs\tests\src\Kernel\SoapClientManagerTest.php
---------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
7 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
16 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
50 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

FILE: modules\wsdl_docs\wsdl_docs.install
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
3 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: modules\wsdl_docs\wsdl_docs.module
----------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
----------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
3 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
17 | ERROR | [x] Expected 1 space before opening brace; found 0
26 | ERROR | [x] Expected 1 space before opening brace; found 0
35 | ERROR | [x] Expected 1 space before opening brace; found 0
49 | ERROR | [x] Expected 1 space before opening brace; found 0
----------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Steps to reproduce

Run phpcs command to get the drupal coding standard issues.

Proposed resolution

Many of the issues can be fixed by running the phpcbf command. For the remaining ones, we will need to manually address and then commit these changes before pushing them.

šŸ“Œ Task
Status

Needs work

Version

4.0

Component

Code

Created by

šŸ‡ŗšŸ‡øUnited States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024