Fix the issues reported by phpcs

Created on 14 April 2023, over 1 year ago
Updated 19 April 2023, over 1 year ago

Problem/Motivation

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\barcodes-3354157\src\Plugin\Block\Barcode.php
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 5 WARNINGS AFFECTING 6 LINES
---------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
166 | WARNING | [ ] #options values usually have to run through t() for translation
167 | WARNING | [ ] #options values usually have to run through t() for translation
168 | WARNING | [ ] #options values usually have to run through t() for translation
169 | WARNING | [ ] #options values usually have to run through t() for translation
170 | WARNING | [ ] #options values usually have to run through t() for translation
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\barcodes-3354157\src\Plugin\Field\FieldFormatter\Barcode.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 7 WARNINGS AFFECTING 8 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
67 | WARNING | [ ] #options values usually have to run through t() for translation
68 | WARNING | [ ] #options values usually have to run through t() for translation
69 | WARNING | [ ] #options values usually have to run through t() for translation
70 | WARNING | [ ] #options values usually have to run through t() for translation
71 | WARNING | [ ] #options values usually have to run through t() for translation
154 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
212 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\barcodes-3354157\src\Template\Barcode.php
-----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\barcodes-3354157\tests\src\Functional\BarcodeBlockTest.php
----------------------------------------------------------------------------------------------------------------------
FOUND 73 ERRORS AFFECTING 73 LINES
----------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
134 | ERROR | [ ] Return type "array>" must not contain spaces
152 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
153 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
154 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
155 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
156 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
157 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
158 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
159 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
160 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
161 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
162 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
163 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
164 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
165 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
166 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
167 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
168 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
169 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
170 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
171 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
172 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
173 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
174 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
175 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
176 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
177 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
178 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
179 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
180 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
181 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
182 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
183 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
184 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
185 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
186 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
187 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
193 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
194 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
195 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
196 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
197 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
198 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
199 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
200 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
201 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
202 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
203 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
204 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
205 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
206 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
207 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
208 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
209 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
210 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
211 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
212 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
213 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
214 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
215 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
216 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
217 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
218 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
219 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
220 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
221 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
222 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
223 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
224 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
225 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
231 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
237 | ERROR | [x] Array indentation error, expected 8 spaces but found 0
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 72 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

Time: 2.13 secs; Memory: 6MB

Steps to reproduce

Run codesniffer on the module...

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

2.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

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024