This is trivial (low priority and a workaround exists), but worth reporting.

The following function comment is quoted from the online Drupal docs, and this is made clear by 'Quotes':

  /**
   * 'The type of list to return (e.g. "ul", "ol")'.
   * 
   * @return string
   *   'The type of list to return (e.g. "ul", "ol").'
   */
  public function getType() {
    return $this->type;
  }

Coder reports:
ERROR | Function comment short description must start with a capital letter

Of course it's easily solved with something like:

  /**
   * Gets the 'type of list to return (e.g. "ul", "ol")'.
   * 
   * @return string
   *   'The type of list to return (e.g. "ul", "ol").'
   */
  public function getType() {
    return $this->type;
  }

But I can see no good reason why some punctuation should not be allowed in the rule.

[EDIT: amended original getter docs incorrectly had @param not @return]

Comments

webel’s picture

Issue summary: View changes
webel’s picture

Issue summary: View changes
klausi’s picture

Status: Active » Postponed (maintainer needs more info)

Could you provide a link/reference where this is located in the Drupal docs?

Sounds like a bug in the documentation to me, since it does not make sense to use quotes here. Are there any realistic examples where quotes would make sense at the beginning?

webel’s picture

it does not make sense to use quotes here. Are there any realistic examples where quotes would make sense at the beginning?

The only case I can think of is, for educational purposes, and as a courtesy to the original source, quoting say copied Drupal.org docs, like the example showed.

If I do not quote 'The type of list to return (e.g. "ul", "ol")', it is clumsy to have to indicate afterwards that it was quoted. But it's not very important.

klausi’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

If you just want to repeat docs on overridden methods then you should use {@inheritdoc}.

So I don't think we have a use case to allow quotes at the beginning.