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
-----------------------------------------------------------------------------------------------
CommentFileSizeAuthor
#2 3360392-2.patch2.88 KBshanu chouhan

Comments

Shanu Chouhan created an issue. See original summary.

shanu chouhan’s picture

Assigned: shanu chouhan » Unassigned
Status: Active » Needs review
StatusFileSize
new2.88 KB

Here's a patch for it.

avpaderno’s picture

Status: Needs review » Needs work
+  /**
+   * {@inheritdoc}
+   */
   public function alerts($options = []) {

The parent class does not have an alerts() method. {@inheritdoc} cannot be used for that documentation comment.

    * @return \Drupal\Core\Entity\EntityInterface
+   *   The reloaded entity.
+   *
    * @throws \Drupal\Core\Entity\EntityStorageException
    */
   public function syncAlert(array $result, &$counter = 0) {

What that method returns is a message entity.

asherry’s picture

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

asherry’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.