Drupal Coding Standard issue

Created on 14 July 2022, over 2 years ago
Updated 30 August 2024, 4 months ago

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

FILE: C:\Users\SI-001\Downloads\toc_js\src\Plugin\Block\TocJsBlock.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------
222 | WARNING | [ ] Avoid backslash escaping in translatable strings when possible, use "" quotes instead
277 | ERROR | [x] Inline comments must start with a capital letter
277 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
282 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

FILE: C:\Users\SI-001\Downloads\toc_js\toc_js.install
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
17 | WARNING | [x] '@todo: simplified when #3093289: Update to use latest version of TOC.js library. lands to keep dist folder only.' should match the format '@todo Fix problem X here.'
42 | ERROR | [x] There should be no white space after an opening "{"
42 | ERROR | [x] There should be no white space before a closing "}"
42 | ERROR | [x] Closing brace must be on a line by itself
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\Users\SI-001\Downloads\toc_js\toc_js.module
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 7 WARNINGS AFFECTING 11 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
61 | ERROR | [ ] Type hint "array" missing for $variables
109 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
124 | ERROR | [x] Inline comments must start with a capital letter
124 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
129 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
377 | WARNING | [ ] Avoid backslash escaping in translatable strings when possible, use "" quotes instead
432 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
434 | WARNING | [x] '@todo: simplified when #3093289: Update to use latest version of TOC.js library. lands to keep dist folder only.' should match the format '@todo Fix problem X here.'
444 | WARNING | [x] A comma should follow the last multiline array item. Found: TRUE
445 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
452 | WARNING | [x] A comma should follow the last multiline array item. Found: TRUE
453 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------

Time: 326ms; Memory: 12MB

📌 Task
Status

Fixed

Version

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