Drupal Coding Standard issue

Created on 22 April 2024, 8 months ago
Updated 6 May 2024, 8 months ago

There are below Drupal Coding standard issues.

FILE: get_url\get_url.services.yml
-------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------

FILE: get_url\README.txt
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
3 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY

FILE: get_url\src\TwigExtension.php
-------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 28 ERRORS AND 2 WARNINGS AFFECTING 17 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [x] There must be one blank line after the namespace declaration
4 | WARNING | [x] Unused use statement
4 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Path.
6 | ERROR | [x] Missing class doc comment
7 | ERROR | [x] Whitespace found at end of line
9 | ERROR | [ ] Doc comment short description must start with a capital letter
10 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
15 | ERROR | [x] Whitespace found at end of line
20 | ERROR | [x] Short array syntax must be used to define arrays
21 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
21 | ERROR | [x] Short array syntax must be used to define arrays
21 | ERROR | [x] Short array syntax must be used to define arrays
21 | ERROR | [x] Short array syntax must be used to define arrays
25 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
25 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
25 | ERROR | [x] Missing function doc comment
25 | ERROR | [ ] Public method name "TwigExtension::get_url" is not in lowerCamel format
26 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
26 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
27 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
27 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
27 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
27 | ERROR | [x] No space found before comment text; expected "// $alias = Url::fromRoute('entity.node.canonical', ['node' => $nodeid])->toString();" but found
| | "//$alias = Url::fromRoute('entity.node.canonical', ['node' => $nodeid])->toString();"
28 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
28 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
29 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
30 | ERROR | [x] Whitespace found at end of line
31 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 26 MARKED SNIFF VIOLATIONS AUTOMATICALLY

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

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