Created
March 5, 2019 13:54
-
-
Save pondermatic/dad515cd8d80297190b053e18ed9d1ba to your computer and use it in GitHub Desktop.
My preferred format and tag order of a PHP DocBlock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Credit to scipilot.
https://stackoverflow.com/questions/30235371/order-of-tags-in-the-php-doc#answer-30236482