The description for TermInterface::setWeight() is the following.

Gets the weight of this term.

Since it's a setter method, it doesn't get but it sets.

I would rather replace that description with the following one.

Sets the term weight.

It's not even necessary to say this term, since there is a single parameter, and that is not a term object.

The description of other methods doesn't write ID correctly (it's written in lowercase characters), and other descriptions use a not necessarily verbose description. (The term name should be preferable over the name of the term.) It's not even necessary to use the possessive, since nouns can be used as attributive of other nouns (as in the family house).

Comments

kiamlaluno created an issue. See original summary.

avpaderno’s picture

Title: Setter method is describing as "Gets the weight of this term." » Fix the wrong method descriptions for the TermInterface interface
Issue summary: View changes
avpaderno’s picture

Status: Active » Needs review
StatusFileSize
new2.57 KB
avpaderno’s picture

Issue summary: View changes
foxtrotcharlie’s picture

Status: Needs review » Needs work

Nice work. One thing missing that I noticed:

   /**
-   * Gets the weight of this term.
+   * Gets the term weight.
    *
    * @param int $weight
-   *   The term's weight.
+   *   The term weight.
    *
    * @return $this
    */
   public function setWeight($weight);

Should be "Sets the term weight." instead of "Gets the term weight."

volkswagenchick’s picture

Issue tags: +badcamp 2018

tagging for badcamp 2018

msankhala’s picture

Status: Needs work » Needs review
StatusFileSize
new2.49 KB
new442 bytes
avpaderno’s picture

@foxtrotcharlie Whoops, I indeed missed that. The new patch fixes that too.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

This makes sense!

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed 4052d65 and pushed to 8.7.x. Thanks!

  • catch committed 4052d65 on 8.7.x
    Issue #3004898 by msankhala, kiamlaluno: Fix the wrong method...

Status: Fixed » Closed (fixed)

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