Skip to content

Commit

Permalink
Add @method to docs (#3595)
Browse files Browse the repository at this point in the history
* Add @method

* Fix links
  • Loading branch information
olleharstedt authored Jun 17, 2020
1 parent aff2805 commit 948be82
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions docs/annotating_code/supported_annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@ Psalm supports a wide range of docblock annotations.

Psalm uses the following PHPDoc tags to understand your code:

- [`@var`](https://docs.phpdoc.org/references/phpdoc/tags/var.html)
- [`@var`](https://docs.phpdoc.org/latest/references/phpdoc/tags/var.html)
Used for specifying the types of properties and variables
- [`@return`](https://docs.phpdoc.org/references/phpdoc/tags/return.html)
- [`@return`](https://docs.phpdoc.org/latest/references/phpdoc/tags/return.html)
Used for specifying the return types of functions, methods and closures
- [`@param`](https://docs.phpdoc.org/references/phpdoc/tags/param.html)
- [`@param`](https://docs.phpdoc.org/latest/references/phpdoc/tags/param.html)
Used for specifying types of parameters passed to functions, methods and closures
- [`@property`](https://docs.phpdoc.org/references/phpdoc/tags/property.html)
- [`@property`](https://docs.phpdoc.org/latest/references/phpdoc/tags/property.html)
Used to specify what properties can be accessed on an object that uses `__get` and `__set`
- [`@property-read`](https://docs.phpdoc.org/references/phpdoc/tags/property-read.html)
- [`@property-read`](https://docs.phpdoc.org/latest/references/phpdoc/tags/property-read.html)
Used to specify what properties can be read on object that uses `__get`
- [`@property-write`](https://docs.phpdoc.org/references/phpdoc/tags/property-write.html)
- [`@property-write`](https://docs.phpdoc.org/latest/references/phpdoc/tags/property-write.html)
Used to specify what properties can be written on object that uses `__set`
- [`@deprecated`](https://docs.phpdoc.org/references/phpdoc/tags/deprecated.html)
- [`@method`](https://docs.phpdoc.org/latest/references/phpdoc/tags/method.html)
Used to specify which magic methods are available on object that uses `__call`.
- [`@deprecated`](https://docs.phpdoc.org/latest/references/phpdoc/tags/deprecated.html)
Used to mark functions, methods, classes and interfaces as being deprecated
- [`@internal`](https://docs.phpdoc.org/references/phpdoc/tags/internal.html)
- [`@internal`](https://docs.phpdoc.org/latest/references/phpdoc/tags/internal.html)
used to mark classes, functions and properties that are internal to an application or library.

### Off-label usage of the `@var` tag
Expand Down

0 comments on commit 948be82

Please sign in to comment.