Problem/Motivation
FILE: /slack_rtm/slack_rtm.links.menu.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
11 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /slack_rtm/slack_rtm.routing.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
17 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /slack_rtm/config/install/slack_rtm.settings.yml
----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------
2 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------
FILE: /slack_rtm/config/schema/slack_rtm.schema.yml
-------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------
18 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------
FILE: /slack_rtm/slack_rtm.module
--------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------------
6 | ERROR | [x] Doc comment short description must be on the first line
10 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
16 | ERROR | [x] Expected 1 blank line before function; 2 found
38 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
62 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------
FILE: /slack_rtm/slack_rtm.links.task.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
30 | ERROR | [x] Expected 1 newline at end of file; 4 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /slack_rtm/slack_rtm.permissions.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
13 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /slack_rtm/src/SlackRtmApi.php
----------------------------------------------------------------------------------------------------
FOUND 21 ERRORS AND 1 WARNING AFFECTING 21 LINES
----------------------------------------------------------------------------------------------------
43 | ERROR | [x] Doc comment short description must end with a full stop
74 | ERROR | [x] Parameter comment must end with a full stop
160 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
161 | ERROR | [x] Expected 2 space(s) before asterisk; 1 found
162 | ERROR | [x] Expected 2 space(s) before asterisk; 1 found
163 | ERROR | [x] Expected 2 space(s) before asterisk; 1 found
164 | ERROR | [x] Expected 2 space(s) before asterisk; 1 found
165 | ERROR | [x] Expected 2 space(s) before asterisk; 1 found
166 | ERROR | [x] Expected 2 space(s) before asterisk; 1 found
166 | ERROR | [ ] Description for the @return value is missing
167 | ERROR | [x] Expected 2 space(s) before asterisk; 1 found
240 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
255 | ERROR | [x] Whitespace found at end of line
256 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks,
| | colons, or closing parentheses
264 | ERROR | [x] Short array syntax must be used to define arrays
269 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | '/src/Batch/SlackRtmBatch.php'
337 | ERROR | [x] Expected "object|null" but found "object|NULL" for function return type
366 | ERROR | [x] Expected "array|null" but found "array|NULL" for function return type
385 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks,
| | colons, or closing parentheses
392 | ERROR | [x] Inline comments must start with a capital letter
413 | ERROR | [x] Expected 1 blank line after function; 0 found
414 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 21 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------
FILE: /slack_rtm/src/Form/SlackRtmMessageUpdateForm.php
-----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------
37 | WARNING | Possible useless method overriding detected
-----------------------------------------------------------------------------------
FILE: /slack_rtm/src/Form/SlackRtmMessageConfigForm.php
----------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 6 WARNINGS AFFECTING 11 LINES
----------------------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
37 | ERROR | [ ] Doc comment for parameter $database does not match actual variable name
| | <undefined>
143 | WARNING | [x] There must be no blank line following an inline comment
156 | WARNING | [ ] Only string literals should be passed to t() where possible
174 | WARNING | [ ] Only string literals should be passed to t() where possible
182 | WARNING | [ ] Only string literals should be passed to t() where possible
200 | WARNING | [ ] Possible useless method overriding detected
218 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
220 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
220 | ERROR | [x] Data types in @param tags need to be fully namespaced
239 | ERROR | [x] Expected 1 blank line after function; 0 found
240 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------
FILE: /slack_rtm/src/Form/SlackRtmMessageForm.php
-----------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------
59 | WARNING | Possible useless method overriding detected
-----------------------------------------------------------------------------
FILE: /slack_rtm/src/Entity/SlackRtmMessageInterface.php
------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------
89 | ERROR | [x] Expected 1 blank line after function; 0 found
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------
FILE: /slack_rtm/src/Entity/SlackRtmMessageCreate.php
----------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 9 LINES
----------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc
| | comment
6 | ERROR | [x] Doc comment short description must end with a full stop
6 | ERROR | [ ] Doc comment short description must be on a single line, further text should be
| | a separate paragraph
9 | ERROR | [x] There must be one blank line after the namespace declaration
13 | WARNING | [x] Unused use statement
15 | ERROR | [x] Missing class doc comment
27 | ERROR | [ ] Missing parameter comment
36 | ERROR | [ ] Description for the @return value is missing
93 | ERROR | [x] Expected 1 newline at end of file; 0 found
93 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------
FILE: /slack_rtm/src/Entity/SlackRtmMessageViewsData.php
------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------
19 | WARNING | [x] There must be no blank line following an inline comment
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------
FILE: /slack_rtm/src/Plugin/QueueWorker/SlackRtmQueue.php
-------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
-------------------------------------------------------------------------------------
25 | ERROR | [x] Expected 1 newline at end of file; 0 found
25 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------
FILE: /slack_rtm/src/SlackRtmMessageListBuilder.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
52 | WARNING | [ ] Only string literals should be passed to t() where possible
55 | WARNING | [x] There must be no blank line following an inline comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: /slack_rtm/src/Batch/SlackRtmBatch.php
----------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 5 LINES
----------------------------------------------------------------------------------------
6 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
26 | ERROR | [x] Expected 1 space between comma and argument "$context"; 2 found
26 | ERROR | [x] Expected one space after the comma, 2 found
64 | WARNING | [x] A comma should follow the last multiline array item. Found: )
72 | ERROR | [x] Expected 1 blank line after function; 0 found
73 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------
FILE: /slack_rtm/src/SlackRtmMessageTranslationHandler.php
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------
12 | WARNING | [x] There must be no blank line following an inline comment
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------
Steps to reproduce
Use below command with arguments.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/slack_rtm
Proposed resolution
Fix the issue found from phpcs command