phpcs coding standard drupal

Created on 22 June 2022, over 2 years ago
Updated 23 January 2023, almost 2 years ago

FILE: C:\xampp\htdocs\test\web\modules\custom\custom_page_title\custom_page_title.install
-----------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
10 | ERROR | [x] There must be no blank lines after the function comment
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\test\web\modules\custom\custom_page_title\custom_page_title.module
----------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
----------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
24 | ERROR | [x] Expected 1 blank line after function; 2 found
37 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
50 | WARNING | [ ] Only string literals should be passed to t() where possible
----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\test\web\modules\custom\custom_page_title\src\Form\CustomPageTitleSettingsForm.php
----------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 11 LINES
----------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
13 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
16 | ERROR | [ ] Missing member variable doc comment
17 | ERROR | [ ] Missing member variable doc comment
75 | ERROR | [x] Expected one space after the comma, 0 found
76 | ERROR | [x] Expected one space after the comma, 0 found
121 | ERROR | [x] Use null coalesce operator instead of ternary operator.
130 | ERROR | [x] Use null coalesce operator instead of ternary operator.
139 | ERROR | [x] Use null coalesce operator instead of ternary operator.
151 | ERROR | [x] Use null coalesce operator instead of ternary operator.
170 | ERROR | [x] Use null coalesce operator instead of ternary operator.
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India Harsh panchal

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