Skip to content

Instantly share code, notes, and snippets.

@pondermatic
Created March 5, 2019 13:54
Show Gist options
  • Save pondermatic/dad515cd8d80297190b053e18ed9d1ba to your computer and use it in GitHub Desktop.
Save pondermatic/dad515cd8d80297190b053e18ed9d1ba to your computer and use it in GitHub Desktop.
My preferred format and tag order of a PHP DocBlock
/**
* One-line introduction followed by a full stop (for the title in some templates).
*
* @deprecated this should be prominent so I often put it at the top!
* @todo Critical TODO ... this function doesn't work yet!
*
* A fuller paragraph detailing stuff.
* A fuller paragraph detailing stuff.
* A fuller paragraph detailing stuff.
* @see is part of the detail
* @example is part of the detail
*
* @todo following on from the detail - what's not been done.
* @todo polishing not done, N2H's.
*
* @since 1.0.0
* @throws and other technical aspecs I'd put here - if any.
*
* @param Then params in a block - in the ACTUAL order of the params
* @param phpstorm always separates the last param from return
* @param with blank line so i've started going with that!
*
* @return is always the last tag - makes sense.
*/
@pondermatic
Copy link
Author

pondermatic commented Mar 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment