Fix the issue reported by phpcs

Created on 27 September 2023, about 1 year ago
Updated 20 June 2024, 5 months ago

Problem/Motivation

Getting following error/warnings:

FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\twig_easy_debug\src\Form\EnableTwigSuggestion.php
-------------------------------------------------------------------------------------------------------------------
FOUND 109 ERRORS AFFECTING 99 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"
2 | ERROR | [x] There must be one blank line after the namespace declaration
6 | ERROR | [x] There must be one blank line after the last USE statement; 0 found;
11 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
12 | ERROR | [x] Expected 7 space(s) before asterisk; 3 found
13 | ERROR | [x] Expected 7 space(s) before asterisk; 3 found
14 | ERROR | [x] Expected 7 space(s) before asterisk; 3 found
15 | ERROR | [x] Expected 7 space(s) before asterisk; 3 found
17 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
18 | ERROR | [x] Expected 4 space(s) before asterisk; 3 found
19 | ERROR | [x] Expected 4 space(s) before asterisk; 3 found
20 | ERROR | [x] Expected 1 blank line before function; 0 found
31 | ERROR | [x] Expected 1 blank line after function; 0 found
32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
33 | ERROR | [x] Expected 1 space(s) before asterisk; 3 found
34 | ERROR | [x] Expected 1 space(s) before asterisk; 3 found
36 | ERROR | [x] Opening brace should be on the same line as the declaration
37 | ERROR | [x] Language constructs must be followed by a single space; expected "return [" but found "return["
40 | ERROR | [x] Expected 1 blank line after function; 0 found
52 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 5
54 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 7
55 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 7
56 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
57 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
58 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
59 | ERROR | [x] Array closing indentation error, expected 7 spaces but found 6
60 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
65 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
66 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
67 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
67 | ERROR | [x] Closing brace indented incorrectly; expected 2 spaces, found 4
68 | ERROR | [x] Whitespace found at end of line
69 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
72 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
73 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
74 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
75 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
76 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
77 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
78 | ERROR | [x] Object operator not indented correctly; expected 8 spaces but found 9
78 | ERROR | [x] Expected one space after the comma, 0 found
79 | ERROR | [x] Expected one space after the comma, 0 found
81 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
82 | ERROR | [x] Whitespace found at end of line
83 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
84 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
85 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
86 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
87 | ERROR | [x] Whitespace found at end of line
88 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
89 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
90 | ERROR | [x] Whitespace found at end of line
91 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
92 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
93 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
94 | ERROR | [x] Whitespace found at end of line
95 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
96 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
97 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
98 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
98 | ERROR | [x] Expected newline after closing brace
99 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
100 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
101 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
102 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
103 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
104 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
105 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
106 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
108 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
109 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
110 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
112 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
113 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
115 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
116 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
117 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
119 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
120 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
121 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
122 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
122 | ERROR | [x] Closing brace indented incorrectly; expected 2 spaces, found 3
122 | ERROR | [x] Expected newline after closing brace
123 | ERROR | [x] Whitespace found at end of line
124 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
125 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
126 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 0
128 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 0
129 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 2
131 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 2
132 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 2
134 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 2
134 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
135 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 4
136 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 4
137 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 4
138 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 4
140 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 4
141 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 4
142 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 2
143 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 0
145 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
145 | ERROR | [x] Closing brace indented incorrectly; expected 3 spaces, found 2
146 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
147 | ERROR | [x] Whitespace found at end of line
148 | ERROR | [x] Expected 1 newline at end of file; 3 found
148 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
148 | ERROR | [x] Closing brace indented incorrectly; expected 0 spaces, found 2
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 109 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\twig_easy_debug\twig_easy_debug.info.yml
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\twig_easy_debug\twig_easy_debug.routing.yml
-----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------

Steps to reproduce

Run following command:

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

Proposed resolution

Above error/warnings need to be fixed.

📌 Task
Status

Needs work

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