Fixing the coding standard issues | phpcs

Created on 3 April 2023, about 1 year ago
Updated 4 April 2023, about 1 year ago

Problem/Motivation

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\next_views_entity_reference-3351779\css\style.css
-------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
17 | ERROR | [x] Expected 1 newline at end of file; 2 found
18 | ERROR | [x] Additional whitespace found at end of file
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------

FILE: ...ocs\backendassignment\web\modules\contrib\next_views_entity_reference-3351779\next_views_entity_reference.info.yml
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
11 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...ackendassignment\web\modules\contrib\next_views_entity_reference-3351779\next_views_entity_reference.libraries.yml
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...tdocs\backendassignment\web\modules\contrib\next_views_entity_reference-3351779\next_views_entity_reference.module
------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
33 | ERROR | [x] There should be no white space after an opening "["
36 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...351779\next_view_entity_reference_example\config\install\core.entity_form_display.node.example_article.default.yml
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
87 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...351779\next_view_entity_reference_example\config\install\core.entity_view_display.node.example_article.default.yml
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
36 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...tity_reference-3351779\next_view_entity_reference_example\config\install\field.field.node.example_article.body.yml
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
22 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...eference-3351779\next_view_entity_reference_example\config\install\field.field.node.example_article.field_tags.yml
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
28 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ..._views_entity_reference-3351779\next_view_entity_reference_example\config\install\views.view.next_tags_example.yml
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
362 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...ext_views_entity_reference-3351779\next_view_entity_reference_example\next_views_entity_reference_example.info.yml
------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
9 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
------------------------------------------------------------------------------------------------------------------------

FILE: ...\next_views_entity_reference-3351779\next_view_entity_reference_example\next_views_entity_reference_example.module
------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
30 | ERROR | [ ] next_views_entity_reference_example_uninstall() is an installation hook and must be declared in an
| | install file
32 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
38 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
46 | ERROR | [x] Inline comments must start with a capital letter
46 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
50 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...ndassignment\web\modules\contrib\next_views_entity_reference-3351779\next_view_entity_reference_example\README.txt
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
84 | ERROR | [x] Expected 1 newline at end of file; 6 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\next_views_entity_reference-3351779\README.txt
----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
96 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------

FILE: ...ignment\web\modules\contrib\next_views_entity_reference-3351779\src\Plugin\Block\NextViewsEntityReferenceBlock.php
------------------------------------------------------------------------------------------------------------------------
FOUND 134 ERRORS AND 10 WARNINGS AFFECTING 96 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
6 | WARNING | [x] Unused use statement
45 | ERROR | [x] Short array syntax must be used to define arrays
46 | ERROR | [x] There should be no white space after an opening "["
46 | ERROR | [x] There should be no white space before a closing "]"
49 | ERROR | [x] There should be no white space after an opening "("
49 | ERROR | [x] There should be no white space before a closing ")"
49 | ERROR | [x] Whitespace found at end of line
50 | ERROR | [x] Concat operator must be surrounded by a single space
50 | ERROR | [x] Concat operator must be surrounded by a single space
50 | ERROR | [x] Concat operator must be surrounded by a single space
50 | ERROR | [x] Concat operator must be surrounded by a single space
52 | ERROR | [x] There should be no white space after an opening "("
52 | ERROR | [x] There should be no white space before a closing ")"
52 | ERROR | [x] Whitespace found at end of line
53 | ERROR | [x] Concat operator must be surrounded by a single space
53 | ERROR | [x] Concat operator must be surrounded by a single space
53 | ERROR | [x] Concat operator must be surrounded by a single space
53 | ERROR | [x] Concat operator must be surrounded by a single space
61 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
62 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
63 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
64 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
65 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
66 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
67 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
67 | ERROR | [x] Whitespace found at end of line
68 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
69 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 4
71 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
72 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
73 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
74 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
75 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
76 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
77 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
78 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 4
80 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
81 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
82 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
83 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
84 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
85 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
85 | ERROR | [ ] The array declaration extends to column 100 (the limit is 80). The array content should be split
| | up over multiple lines
85 | ERROR | [x] There should be no white space after an opening "["
85 | WARNING | [ ] #options values usually have to run through t() for translation
85 | WARNING | [ ] #options values usually have to run through t() for translation
85 | ERROR | [x] Expected 1 space between double arrow and "'Arrows and text'"; 0 found
85 | ERROR | [x] Expected 1 space after "=>"; 0 found
85 | ERROR | [x] There should be no white space before a closing "]"
86 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
87 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
88 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 4
106 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
107 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
108 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
109 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
110 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
113 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
114 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
115 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
116 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
116 | WARNING | [ ] Avoid backslash escaping in translatable strings when possible, use "" quotes instead
117 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
118 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
119 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 4
121 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
122 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
123 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
124 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
125 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
126 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
127 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 4
129 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
130 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
131 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
132 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
132 | WARNING | [ ] Avoid backslash escaping in translatable strings when possible, use "" quotes instead
133 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
134 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
135 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 4
137 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
138 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
139 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
140 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
141 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
142 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
143 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 4
176 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
177 | ERROR | [x] A unary operator statement must not be followed by a space
177 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
182 | ERROR | [x] list(...) is forbidden, use [...] instead.
182 | ERROR | [x] Expected one space after the comma, 0 found
182 | ERROR | [x] Expected one space after the comma, 0 found
182 | ERROR | [x] Whitespace found at end of line
186 | ERROR | [x] Expected one space after the comma, 0 found
191 | ERROR | [x] Inline comments must start with a capital letter
191 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
192 | ERROR | [x] Expected one space after the comma, 0 found
197 | ERROR | [ ] The $_GET super global must not be accessed directly; inject the request_stack service and use
| | $stack->getCurrentRequest()->query instead
198 | ERROR | [x] There should be no white space after an opening "("
198 | ERROR | [ ] The $_GET super global must not be accessed directly; inject the request_stack service and use
| | $stack->getCurrentRequest()->query instead
198 | ERROR | [x] There should be no white space before a closing ")"
199 | ERROR | [x] Expected 1 space before "="; 0 found
199 | ERROR | [x] Expected 1 space after "="; 0 found
199 | ERROR | [x] Concat operator must be surrounded by a single space
199 | ERROR | [x] Concat operator must be surrounded by a single space
201 | ERROR | [x] Expected one space after the comma, 0 found
202 | ERROR | [x] Expected newline after closing brace
206 | ERROR | [x] Inline comments must start with a capital letter
206 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
210 | ERROR | [x] Concat operator must be surrounded by a single space
211 | ERROR | [x] Array indentation error, expected 6 spaces but found 9
214 | ERROR | [x] There should be no white space after an opening "["
214 | ERROR | [x] The first index in a multi-value array must be on a new line
215 | WARNING | [ ] Only string literals should be passed to t() where possible
217 | ERROR | [x] Whitespace found at end of line
218 | ERROR | [x] There should be no white space after an opening "["
218 | ERROR | [x] The first index in a multi-value array must be on a new line
218 | ERROR | [x] Expected 1 space before "-"; 0 found
218 | ERROR | [x] Expected 1 space after "-"; 0 found
218 | ERROR | [x] Concat operator must be surrounded by a single space
220 | WARNING | [ ] Only string literals should be passed to t() where possible
221 | ERROR | [x] Expected 1 space before "-"; 0 found
221 | ERROR | [x] Expected 1 space after "-"; 0 found
222 | ERROR | [x] Expected 1 space before "-"; 0 found
222 | ERROR | [x] Expected 1 space after "-"; 0 found
225 | ERROR | [x] Expected 1 space before "+"; 0 found
225 | ERROR | [x] Expected 1 space after "+"; 0 found
225 | ERROR | [x] Whitespace found at end of line
226 | ERROR | [x] There should be no white space after an opening "["
226 | ERROR | [x] The first index in a multi-value array must be on a new line
226 | ERROR | [x] Expected 1 space before "+"; 0 found
226 | ERROR | [x] Expected 1 space after "+"; 0 found
226 | ERROR | [x] Concat operator must be surrounded by a single space
228 | WARNING | [ ] Only string literals should be passed to t() where possible
229 | ERROR | [x] Expected 1 space before "+"; 0 found
229 | ERROR | [x] Expected 1 space after "+"; 0 found
230 | ERROR | [x] Expected 1 space before "+"; 0 found
230 | ERROR | [x] Expected 1 space after "+"; 0 found
233 | ERROR | [x] There should be no white space after an opening "["
233 | ERROR | [x] The first index in a multi-value array must be on a new line
234 | WARNING | [ ] Only string literals should be passed to t() where possible
237 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 132 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

Time: 1.29 secs; Memory: 6MB

Steps to reproduce

Run the codesniffer command on the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

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

Comments & Activities

Production build 0.69.0 2024