Drupal Coding Standard Issues

Created on 19 August 2022, over 2 years ago
Updated 23 July 2024, 10 months ago

$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml fontawesome_iconpicker/
Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9000 (through xdebug.client_host/xdebug.client_port) :-(

FILE: C:\Users\SI-001\Downloads\fontawesome_iconpicker\fontawesome_iconpicker.module
-------------------------------------------------------------------------------------
FOUND 14 ERRORS AND 3 WARNINGS AFFECTING 17 LINES
-------------------------------------------------------------------------------------
19 | ERROR | [x] Expected 1 blank line before function; 2 found
40 | WARNING | [x] A comma should follow the last multiline array item. Found: '1x'
41 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
42 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
44 | ERROR | [x] Expected 1 blank line after function; 2 found
51 | ERROR | [x] Short array syntax must be used to define arrays
56 | ERROR | [x] Short array syntax must be used to define arrays
59 | ERROR | [x] Short array syntax must be used to define arrays
60 | ERROR | [x] Short array syntax must be used to define arrays
63 | ERROR | [x] Short array syntax must be used to define arrays
67 | ERROR | [x] Short array syntax must be used to define arrays
70 | ERROR | [x] Short array syntax must be used to define arrays
71 | ERROR | [x] Short array syntax must be used to define arrays
72 | ERROR | [x] Short array syntax must be used to define arrays
73 | ERROR | [x] Short array syntax must be used to define arrays
76 | ERROR | [x] Short array syntax must be used to define arrays
93 | ERROR | [x] Short array syntax must be used to define arrays
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------

FILE: C:\Users\SI-001\Downloads\fontawesome_iconpicker\README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
33 | WARNING | Line exceeds 80 characters; contains 84 characters
43 | WARNING | Line exceeds 80 characters; contains 168 characters
----------------------------------------------------------------------

FILE: C:\Users\SI-001\Downloads\fontawesome_iconpicker\src\Plugin\Field\FieldFormatter\FontawesomeIconpicker.php
----------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 10 LINES
----------------------------------------------------------------------------------------------------------------
39 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
40 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
41 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
42 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
43 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
44 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
45 | ERROR | [x] Array indentation error, expected 5 spaces but found 6
46 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 4
54 | ERROR | [x] Short array syntax must be used to define arrays
117 | ERROR | [x] Use null coalesce operator instead of ternary operator.
----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------

FILE: C:\Users\SI-001\Downloads\fontawesome_iconpicker\src\Plugin\Field\FieldWidget\FontawesomeIconpicker.php
-------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------------------
48 | ERROR | [x] Short array syntax must be used to define arrays
81 | ERROR | [x] Whitespace found at end of line
100 | ERROR | [x] Use null coalesce operator instead of ternary operator.
123 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------

Time: 439ms; Memory: 10MB

📌 Task
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇮🇳India Rakhi Soni

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