Update hooks are an exception to the coding guideline that says the docblock should say which hook is implemented (see https://www.drupal.org/node/1354#updateN).

These use a different syntax, because the documentation summary (first line) is displayed to someone running update.php to tell them which updates need to run. So they are documented like this: [...]

This also means the description should be just a single line, which is nog always the case (Drush updb will actually show more than the first line, but update.php will not).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eelkeblok created an issue. See original summary.

eelkeblok’s picture

Here's a patch to clean this up. In some instances, the "Implements.." line was below the first line, which would be OK for update.php (and I can see the appeal of adding this), but at the end of the day it is against the comment guideline linked in the issue summary. Also, like I said, drush updb will show these. So, I removed those too.

jimmyko’s picture

Status: Needs review » Reviewed & tested by the community

I second this change. It looks fine to me.

  • mikeytown2 committed 6c868f8 on 7.x-2.x authored by eelkeblok
    Issue #2844478 by eelkeblok: Update hooks should not say "Implements...
mikeytown2’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch and the review! Patch has been committed.

Status: Fixed » Closed (fixed)

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