Problem/Motivation
Module's code contains several Drupal Coding Standards issues. This task is created to fix them.
Steps to reproduce
Run the command:
phpcs --standard=Drupal , DrupalPractice
/web/modules/contrib/asherry-3357279 /
Proposed resolution
Fix the following coding standards issues and upload the patch or create an MR with fixes.
FILE: \modules\contrib\asherry-3357279\src\Plugin\ApiTools\RaveClient.php
---------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 8 LINES
---------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | WARNING | [x] Unused use statement
8 | ERROR | [ ] Missing short description in doc comment
22 | ERROR | [x] Missing function doc comment
30 | ERROR | [x] Missing function doc comment
37 | ERROR | [x] Missing function doc comment
39 | ERROR | [x] Expected 1 blank line after function; 0 found
40 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------
FILE: \modules\contrib\asherry-3357279\src\Rave\SyncManager.php
-----------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
-----------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
11 | WARNING | [x] Unused use statement
13 | ERROR | [x] Missing class doc comment
15 | ERROR | [ ] Missing short description in doc comment
35 | ERROR | [x] Missing function doc comment
47 | ERROR | [ ] Description for the @return value is missing
48 | ERROR | [x] Separate the @return and @throws sections by a blank line.
54 | WARNING | [x] A comma should follow the last multiline array item. Found: $identifier
74 | ERROR | [x] Expected 1 newline at end of file; 0 found
74 | ERROR | [x] The closing brace for the class must have an empty line before it
-----------------------------------------------------------------------------------------------
Comments
Comment #2
shanu chouhan commentedHere's a patch for it.
Comment #3
avpadernoThe parent class does not have an
alerts()method.{@inheritdoc}cannot be used for that documentation comment.What that method returns is a message entity.
Comment #4
asherry commentedThanks for the issue and the patch, the module is still a work in progress though. I don't honestly know if I'll keep those public methods, the client project where this is being worked on isn't even in the final development stages.
I'll see if I can get your commit in there, just because I try to never turn down patches, but please be patient as this module will probably change before any type of release.
Comment #5
asherry commented