Drupal Coding Standard As Per phpcs--standard=Drupal.

Created on 23 June 2022, over 2 years ago
Updated 20 March 2023, almost 2 years ago

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

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\workflow_buttons\src\Form\SettingsForm.php
-------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
6 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
38 | ERROR | [x] Short array syntax must be used to define arrays
51 | WARNING | [ ] Possible useless method overriding detected
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\workflow_buttons\src\NodeWorkflowButtons.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 9 WARNINGS AFFECTING 10 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
24 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
25 | WARNING | [ ] Line exceeds 80 characters; contains 90 characters
26 | WARNING | [ ] Line exceeds 80 characters; contains 90 characters
27 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
28 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
28 | WARNING | [x] There must be no blank line following an inline comment
28 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
32 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
42 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
46 | WARNING | [ ] Line exceeds 80 characters; contains 93 characters
51 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 0
51 | ERROR | [x] 8 spaces found before inline comment; expected "// $element['unpublish']['#value'] = t('Save as unpublished');" but found "// $element['unpublish']['#value'] = t('Save as
| | unpublished');"
54 | WARNING | [ ] Line exceeds 80 characters; contains 125 characters
54 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 0
54 | ERROR | [x] 8 spaces found before inline comment; expected "// $element['unpublish']['#value'] = !$node->isPublished() ? t('Save and keep unpublished') : t('Save and unpublish');" but found "//
| | $element['unpublish']['#value'] = !$node->isPublished() ? t('Save and keep unpublished') : t('Save and unpublish');"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\workflow_buttons\src\Plugin\Field\FieldWidget\WorkflowButtonsWidget.php
---------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 4 WARNINGS AFFECTING 9 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------
78 | ERROR | [x] Parameter comment must end with a full stop
133 | ERROR | [x] Expected 1 space before "?"; 0 found
152 | ERROR | [x] Data types in @var tags need to be fully namespaced
225 | WARNING | [x] There must be no blank line following an inline comment
225 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
237 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
272 | WARNING | [x] '@TODO Make this so it is not hardcoded on transition ID (machine name).' should match the format '@todo Fix problem X here.'
280 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters
281 | ERROR | [ ] The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
281 | ERROR | [ ] The array declaration extends to column 84 (the limit is 80). The array content should be split up over multiple lines
306 | ERROR | [ ] The array declaration extends to column 95 (the limit is 80). The array content should be split up over multiple lines
---------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\workflow_buttons\tests\src\Functional\NodeFormButtonsTest.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
40 | ERROR | [x] Missing function doc comment
44 | ERROR | [ ] The array declaration extends to column 99 (the limit is 80). The array content should be split up over multiple lines
46 | ERROR | [ ] The array declaration extends to column 89 (the limit is 80). The array content should be split up over multiple lines
-----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\workflow_buttons\workflow_buttons.api.php
------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------
13 | ERROR | Missing parameter type
15 | ERROR | Missing parameter type
------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\workflow_buttons\workflow_buttons.module
-----------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
19 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters
60 | WARNING | [x] There must be no blank line following an inline comment
67 | WARNING | [x] There must be no blank line following an inline comment
93 | ERROR | [x] Missing function doc comment
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------

Time: 406ms; Memory: 12MB

📌 Task
Status

Fixed

Version

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