mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-29 16:19:55 +02:00
Fix a couple typos in the PHPDoc section
This commit is contained in:
@@ -60,17 +60,14 @@ class DateTimeHelper
|
||||
{% endhighlight %}
|
||||
|
||||
The documentation for the class as a whole has the [@author] tag and a [@link] tag. The [@author] tag is used to
|
||||
document the author of the code and can be repeated for documenting several authors. The [@link] tag is used to link to
|
||||
a website indicating a relationship between the website and the code.
|
||||
document the author of the code and can be repeated for documenting several authors. The [@link] tag is used to link to a website indicating a relationship between the website and the code.
|
||||
|
||||
Inside the class, the first method has an [@param] tag documenting the type, name and description of the parameter
|
||||
being passed to the method. Additionally it has the [@return] and [@throws] tags for documenting the return type, and
|
||||
any exceptions that could be throw respectively.
|
||||
Inside the class, the first method has a [@param] tag documenting the type, name and description of the parameter
|
||||
being passed to the method. Additionally it has the [@return] and [@throws] tags for documenting the return type, and any exceptions that could be thrown respectively.
|
||||
|
||||
The second and third methods are very similar and have a single [@param] tag as did the first method. The import
|
||||
difference between the second and third method is doc block is the inclusion/exclusion of the [@return] tag.
|
||||
`@return void` explicitly informs us that there is no return, historically omitting the `@return void` statement also
|
||||
results in the same (no return) action.
|
||||
The second and third methods are very similar and have a single [@param] tag as did the first method. The important
|
||||
difference between the second and third method's doc block is the inclusion/exclusion of the [@return] tag.
|
||||
`@return void` explicitly informs us that there is no return; historically omitting the `@return void` statement also results in the same (no return) action.
|
||||
|
||||
|
||||
[tags]: http://www.phpdoc.org/docs/latest/references/phpdoc/tags/index.html
|
||||
|
Reference in New Issue
Block a user