Skip to content

Commit

Permalink
Fix a couple typos in the PHPDoc section
Browse files Browse the repository at this point in the history
  • Loading branch information
echernyavskiy committed Oct 3, 2015
1 parent 96a96b5 commit 9c34497
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions _posts/15-02-01-PHPDoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9c34497

Please sign in to comment.