Fix the issues reported by phpcs

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

Problem/Motivation

There are some issues which are reported by PHP code sniffer within the .theme file.

Steps to reproduce

Need to fix the following issues using the php code standard commands.

FOUND 46 ERRORS AND 9 WARNINGS AFFECTING 41 LINES
-------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
13 | WARNING | [x] Unused use statement
14 | WARNING | [x] Unused use statement
15 | WARNING | [x] Unused use statement
16 | WARNING | [x] Unused use statement
56 | ERROR | [x] Short array syntax must be used to define arrays
60 | ERROR | [x] Short array syntax must be used to define arrays
68 | ERROR | [x] Short array syntax must be used to define arrays
69 | ERROR | [x] Short array syntax must be used to define arrays
71 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
82 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
82 | ERROR | [x] Doc comment short description must end with a full stop
85 | ERROR | [x] Short array syntax must be used to define arrays
87 | ERROR | [x] Concat operator must be surrounded by a single space
87 | ERROR | [x] Expected one space after the comma, 0 found
88 | ERROR | [x] Expected 1 space after "?"; 2 found
102 | ERROR | [x] Concat operator must be surrounded by a single space
111 | ERROR | [x] Concat operator must be surrounded by a single space
124 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
126 | ERROR | [x] Short array syntax must be used to define arrays
133 | ERROR | [x] Expected 1 blank line after function; 4 found
136 | ERROR | [ ] More than 2 empty lines are not allowed
137 | ERROR | [ ] More than 2 empty lines are not allowed
150 | ERROR | [x] Inline comments must start with a capital letter
185 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
186 | ERROR | [x] Short array syntax must be used to define arrays
192 | ERROR | [x] Short array syntax must be used to define arrays
198 | ERROR | [x] Short array syntax must be used to define arrays
204 | ERROR | [x] Short array syntax must be used to define arrays
210 | ERROR | [x] Short array syntax must be used to define arrays
215 | ERROR | [x] Short array syntax must be used to define arrays
217 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
217 | ERROR | [ ] Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
217 | ERROR | [x] Concat operator must be surrounded by a single space
221 | ERROR | [x] Short array syntax must be used to define arrays
223 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
223 | ERROR | [ ] Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
223 | ERROR | [x] Concat operator must be surrounded by a single space
223 | ERROR | [x] Concat operator must be surrounded by a single space
224 | ERROR | [x] Expected one space after the comma, 0 found
226 | ERROR | [x] Short array syntax must be used to define arrays
228 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
228 | ERROR | [ ] Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
228 | ERROR | [x] Concat operator must be surrounded by a single space
228 | ERROR | [x] Concat operator must be surrounded by a single space
229 | ERROR | [x] Expected one space after the comma, 0 found
231 | ERROR | [x] Short array syntax must be used to define arrays
233 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
233 | ERROR | [ ] Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
233 | ERROR | [x] Concat operator must be surrounded by a single space
233 | ERROR | [x] Concat operator must be surrounded by a single space
234 | ERROR | [x] Concat operator must be surrounded by a single space
234 | ERROR | [x] Expected one space after the comma, 0 found
245 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
251 | ERROR | [x] Expected 1 space after "="; 2 found

๐Ÿ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Prachi6824

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