Doc comment for var $settings does not match actual variable name &$settings at position 1

@param statements shouldn't contain the & for parameters passed by reference.

Comments

das-peter’s picture

Status: Active » Fixed

Thanks for reporting this. :)
Fixed and committed: http://drupalcode.org/project/drupalcs.git/commit/f6555d5

klausi’s picture

Status: Fixed » Active

Are we sure about that? I think it is a huge advantage if I see in the documentation that the parameter is taken as reference. Do we have any rule regarding this in the coding standards?

das-peter’s picture

Klausi you're right - at least I couldn't find such a rule.
We should try to get such a rule into the standards and then adjust the sniff accordingly.
According to the documentation we should:

Note: Before making any changes to the standards in this document, please file an issue in the Drupal issue queue, with component "documentation", so your proposed changes can be discussed.

Shall we open such an issue or does anyone know who we could contact first?

tim.plunkett’s picture

You can ask jhodgdon, but she will likely tell you to file an issue.

This is definitely fixed for now, I won't change the status but it should be fixed or postponed.

klausi’s picture

I have disabled the warning if the "&" is in the @param documentation until this is sorted out. See http://drupalcode.org/project/drupalcs.git/commit/1a6268a

I would say this issue stays "active" until we have a drupal core issue to settle the coding standards for this.

klausi’s picture

Status: Active » Postponed

Opened a core issue: #1368794: Using '&' in doxygen @param documentation. This issue is postponed until we reach a solution there.

klausi’s picture

Status: Postponed » Closed (won't fix)

Drupal Code Sniffer has been merged into Coder 7.x-2.x. Please move this issue to the Coder queue and reopen it if the problem still exists.