API page: https://api.drupal.org/api/drupal/core%21modules%21user%21src%21RoleInte...

Patch attached:

diff --git a/core/modules/user/src/RoleInterface.php b/core/modules/user/src/RoleInterface.php
index 0820db4..0d692b8 100644
--- a/core/modules/user/src/RoleInterface.php
+++ b/core/modules/user/src/RoleInterface.php
@@ -78,9 +78,9 @@ public function isAdmin();
    * Sets the role to be an admin role.
    *
    * @param bool $is_admin
-   *   TRUE, if the role should be an admin role.
+   *   TRUE if the role should be an admin role.
    *
-   * return $this
+   * @return $this
    */
   public function setIsAdmin($is_admin);

CommentFileSizeAuthor
role-interface-docs.patch534 bytesTR
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, role-interface-docs.patch, failed testing.

TR’s picture

Status: Needs work » Needs review

Bogus test fail.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quick fix

Thanks, looks fine!

cilefen’s picture

Title: "return" used instead of "@return" in documentation » "return" used instead of "@return" in RoleInterface::isAdmin() docblock
cilefen’s picture

Title: "return" used instead of "@return" in RoleInterface::isAdmin() docblock » "return" used instead of "@return" in RoleInterface::isAdmin docblock

webchick queued role-interface-docs.patch for re-testing.

xjm’s picture

Title: "return" used instead of "@return" in RoleInterface::isAdmin docblock » "return" used instead of "@return" in RoleInterface::isAdmin() docblock
Status: Reviewed & tested by the community » Fixed

This issue only changes documentation, so per https://www.drupal.org/core/beta-changes, this can be completed any time during the Drupal 8 beta phase. Committed and pushed to 8.0.x. Thanks!

  • xjm committed 4b8b58a on 8.0.x
    Issue #2532616 by TR: "return" used instead of "@return" in...
xjm’s picture

I've just noticed that other similar patches were made for #2532646: "@return boolean" is wrong, use "@return bool" and #2532618: "return" used instead of "@return" in documentation. Instead of doing this in many small patches going forward, let's just create one patch that fixes all the instances of this in core.

jhodgdon’s picture

I'm of mixed feelings about that. At least these issues got done. Issues like #2224781: Misc API docs fixes take forever to get right, and issues like ... that one we did recently that fixed all the @file doc blocks... the wholesale ones that are generated by scripts conflict with a lot of patches and are hard to get committed, and in the meantime they go to 100 comments due to rerolls.

So, In some cases, someone saying "Oh I noticed this problem here, here's a small patch" is better because at least it gets done.

xjm’s picture

Thanks @jhodgdon! In general I agree that there are times to do it one way or the other. From my perspective, the problem with #2224781: Misc API docs fixes is that it doesn't have a single scope. @webchick and I drafted some recommendations about this awhile back that are here:
https://docs.google.com/document/d/1zYDnu45djDBcU87sNgKk15C5XDBYzNHvahoq...

jhodgdon’s picture

@xjm - Do you have an issue where this can be discussed?

Status: Fixed » Closed (fixed)

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