@@ -30,6 +30,216 @@ be installed using the following command in a root of your project:
30
30
composer require type-lang/phpdoc
31
31
```
32
32
33
+ ## Supported Tags
34
+
35
+ - [ ] ` @abstract ` - TODO
36
+ - [ ] ` @api ` - TODO
37
+ - [ ] ` @author ` - TODO
38
+ - [ ] ` @category ` - TODO
39
+ - [ ] ` @copyright ` - TODO
40
+ - [ ] ` @deprecated ` - TODO
41
+ - [ ] ` @example ` - TODO
42
+ - [x] ` @extends ` - Allows to extend templated classes and interfaces
43
+ - [ ] ` @filesource ` - TODO
44
+ - [ ] ` @final ` - TODO
45
+ - [ ] ` @global ` - TODO
46
+ - [ ] ` @ignore ` - TODO
47
+ - [x] ` @implements ` - Allows to extend templated interfaces
48
+ - [ ] ` @inheritdoc ` - TODO
49
+ - [x] ` @inherits ` - An alias of ` @extends ` tag
50
+ - [ ] ` @internal ` - TODO
51
+ - [ ] ` @license ` - TODO
52
+ - [x] ` @link ` - Indicates a custom relation between the associated _ Symbol_ and a website, which is identified by an absolute URI
53
+ - [x] ` @method ` - Allows a class to know which "_ magic_ " methods are callable
54
+ - [ ] ` @mixin ` - TODO
55
+ - [ ] ` @no-named-arguments ` - TODO
56
+ - [ ] ` @package ` - TODO
57
+ - [ ] ` @override ` - TODO
58
+ - [x] ` @param ` - Used to document a single argument of a function or method
59
+ - [ ] ` @param-closure-this ` - TODO
60
+ - [ ] ` @param-immediately-invoked-callable ` - TODO
61
+ - [ ] ` @param-later-invoked-callable ` - TODO
62
+ - [ ] ` @param-out ` - TODO
63
+ - [x] ` @property ` - Used to declare which "_ magic_ " properties are supported
64
+ - [x] ` @property-read ` - Used to declare which "_ magic_ " properties are supported for reading
65
+ - [x] ` @property-write ` - Used to declare which "_ magic_ " properties are supported for writing
66
+ - [ ] ` @pure-unless-callable-is-impure ` - TODO
67
+ - [ ] ` @readonly ` - TODO
68
+ - [ ] ` @require-extends ` - TODO
69
+ - [ ] ` @require-implements ` - TODO
70
+ - [x] ` @return ` - Used to document the return value of functions or methods
71
+ - [x] ` @returns ` - An alias of ` @return ` tag
72
+ - [ ] ` @seal-methods ` - TODO
73
+ - [ ] ` @seal-properties ` - TODO
74
+ - [x] ` @see ` - Indicates a reference from the associated _ Symbol(s)_ to a website or other _ Symbol(s)_
75
+ - [ ] ` @since ` - TODO
76
+ - [ ] ` @source ` - TODO
77
+ - [ ] ` @subpackage ` - TODO
78
+ - [ ] ` @suppress ` - TODO
79
+ - [x] ` @template ` - Allows classes (and class-like entries), functions and methods to declare a generic type parameter
80
+ - [x] ` @template-contravariant ` - Allows classes (and class-like entries), functions and methods to declare a generic contravariant type parameter
81
+ - [x] ` @template-covariant ` - Allows classes (and class-like entries), functions and methods to declare a generic covariant type parameter
82
+ - [x] ` @template-extends ` - An alias of ` @extends ` tag
83
+ - [x] ` @template-implements ` - An alias of ` @implements ` tag
84
+ - [x] ` @template-use ` - Allows to extend templated traits
85
+ - [x] ` @throw ` - An alias of ` @throws ` tag
86
+ - [x] ` @throws ` - Used to indicate whether _ Symbol_ throw a specific type of ` \Throwable ` (exception or error)
87
+ - [ ] ` @todo ` - TODO
88
+ - [ ] ` @unused-param ` - TODO
89
+ - [x] ` @use ` - An alias of ` @template-use ` tag
90
+ - [ ] ` @used-by ` - TODO
91
+ - [ ] ` @uses ` - TODO
92
+ - [x] ` @var ` - Document the _ Type_ of the following _ Symbol_
93
+ - [ ] ` @version ` - TODO
94
+
95
+ ### Psalm Tags
96
+
97
+ - [ ] ` @psalm-allow-private-mutation ` - TODO
98
+ - [ ] ` @psalm-api ` - TODO
99
+ - [ ] ` @psalm-assert ` - TODO
100
+ - [ ] ` @psalm-assert-if-false ` - TODO
101
+ - [ ] ` @psalm-assert-if-true ` - TODO
102
+ - [ ] ` @psalm-assert-untainted ` - TODO
103
+ - [ ] ` @psalm-check-type ` - TODO
104
+ - [ ] ` @psalm-check-type-exact ` - TODO
105
+ - [ ] ` @psalm-consistent-constructor ` - TODO
106
+ - [ ] ` @psalm-consistent-templates ` - TODO
107
+ - [ ] ` @psalm-external-mutation-free ` - TODO
108
+ - [x] ` @psalm-extends ` - Vendor-specific ` @extends ` alias
109
+ - [ ] ` @psalm-flow ` - TODO
110
+ - [ ] ` @psalm-if-this-is ` - TODO
111
+ - [ ] ` @psalm-ignore-falsable-return ` - TODO
112
+ - [ ] ` @psalm-ignore-nullable-return ` - TODO
113
+ - [ ] ` @psalm-ignore-var ` - TODO
114
+ - [ ] ` @psalm-ignore-variable-method ` - TODO
115
+ - [ ] ` @psalm-ignore-variable-property ` - TODO
116
+ - [ ] ` @psalm-immutable ` - TODO
117
+ - [x] ` @psalm-implements ` - Vendor-specific ` @implements ` alias
118
+ - [ ] ` @psalm-import-type ` - TODO
119
+ - [ ] ` @psalm-inheritors ` - TODO
120
+ - [ ] ` @psalm-internal ` - TODO
121
+ - [x] ` @psalm-method ` - Vendor-specific ` @method ` alias
122
+ - [ ] ` @psalm-mutation-free ` - TODO
123
+ - [ ] ` @psalm-no-seal-methods ` - TODO
124
+ - [ ] ` @psalm-no-seal-properties ` - TODO
125
+ - [ ] ` @psalm-override-method-visibility ` - TODO
126
+ - [ ] ` @psalm-override-property-visibility ` - TODO
127
+ - [x] ` @psalm-param ` - Vendor-specific ` @param ` alias
128
+ - [ ] ` @psalm-param-out ` - TODO
129
+ - [x] ` @psalm-property ` - Vendor-specific ` @property ` alias
130
+ - [x] ` @psalm-property-read ` - Vendor-specific ` @property-read ` alias
131
+ - [x] ` @psalm-property-write ` - Vendor-specific ` @property-write ` alias
132
+ - [ ] ` @psalm-pure ` - TODO
133
+ - [ ] ` @psalm-readonly ` - TODO
134
+ - [ ] ` @psalm-readonly-allow-private-mutation ` - TODO
135
+ - [ ] ` @psalm-require-extends ` - TODO
136
+ - [ ] ` @psalm-require-implements ` - TODO
137
+ - [x] ` @psalm-return ` - Vendor-specific ` @return ` alias
138
+ - [ ] ` @psalm-scope-this ` - TODO
139
+ - [ ] ` @psalm-seal-methods ` - TODO
140
+ - [ ] ` @psalm-seal-properties ` - TODO
141
+ - [ ] ` @psalm-self-out ` - TODO
142
+ - [ ] ` @psalm-stub-override ` - TODO
143
+ - [ ] ` @psalm-suppress ` - TODO
144
+ - [ ] ` @psalm-taint-escape ` - TODO
145
+ - [ ] ` @psalm-taint-sink ` - TODO
146
+ - [ ] ` @psalm-taint-source ` - TODO
147
+ - [ ] ` @psalm-taint-specialize ` - TODO
148
+ - [ ] ` @psalm-taint-unescape ` - TODO
149
+ - [x] ` @psalm-template ` - Vendor-specific ` @template ` alias
150
+ - [x] ` @psalm-template-contravariant ` - Vendor-specific ` @template-contravariant ` alias
151
+ - [x] ` @psalm-template-covariant ` - Vendor-specific ` @template-covariant ` alias
152
+ - [ ] ` @psalm-this-out ` - TODO
153
+ - [ ] ` @psalm-trace ` - TODO
154
+ - [ ] ` @psalm-type ` - TODO
155
+ - [x] ` @psalm-use ` - Vendor-specific ` @use ` alias
156
+ - [x] ` @psalm-var ` - Vendor-specific ` @var ` alias
157
+ - [ ] ` @psalm-variadic ` - TODO
158
+ - [ ] ` @psalm-yield ` - TODO
159
+
160
+ ### PHPStan Tags
161
+
162
+ - [ ] ` @phpstan-allow-private-mutation ` - TODO
163
+ - [ ] ` @phpstan-assert ` - TODO
164
+ - [ ] ` @phpstan-assert-if-false ` - TODO
165
+ - [ ] ` @phpstan-assert-if-true ` - TODO
166
+ - [ ] ` @phpstan-consistent-constructor ` - TODO
167
+ - [ ] ` @phpstan-extends ` - TODO
168
+ - [ ] ` @phpstan-ignore ` - TODO
169
+ - [ ] ` @phpstan-ignore-line ` - TODO
170
+ - [ ] ` @phpstan-ignore-next-line ` - TODO
171
+ - [ ] ` @phpstan-immutable ` - TODO
172
+ - [ ] ` @phpstan-implements ` - TODO
173
+ - [ ] ` @phpstan-import-type ` - TODO
174
+ - [ ] ` @phpstan-impure ` - TODO
175
+ - [x] ` @phpstan-method ` - Vendor-specific ` @method ` alias
176
+ - [x] ` @phpstan-param ` - Vendor-specific ` @param ` alias
177
+ - [ ] ` @phpstan-param-closure-this ` - TODO
178
+ - [ ] ` @phpstan-param-immediately-invoked-callable ` - TODO
179
+ - [ ] ` @phpstan-param-later-invoked-callable ` - TODO
180
+ - [ ] ` @phpstan-param-out ` - TODO
181
+ - [ ] ` @phpstan-property ` - Vendor-specific ` @property ` alias
182
+ - [ ] ` @phpstan-property-read ` - Vendor-specific ` @property-read ` alias
183
+ - [ ] ` @phpstan-property-write ` - Vendor-specific ` @property-write ` alias
184
+ - [ ] ` @phpstan-pure ` - TODO
185
+ - [ ] ` @phpstan-pure-unless-callable-is-impure ` - TODO
186
+ - [ ] ` @phpstan-readonly ` - TODO
187
+ - [ ] ` @phpstan-readonly-allow-private-mutation ` - TODO
188
+ - [ ] ` @phpstan-require-extends ` - TODO
189
+ - [ ] ` @phpstan-require-implements ` - TODO
190
+ - [ ] ` @phpstan-return ` - Vendor-specific ` @return ` alias
191
+ - [ ] ` @phpstan-self-out ` - TODO
192
+ - [x] ` @phpstan-template ` - Vendor-specific ` @template ` alias
193
+ - [x] ` @phpstan-template-contravariant ` - Vendor-specific ` @template-contravariant ` alias
194
+ - [x] ` @phpstan-template-covariant ` - Vendor-specific ` @template-covariant ` alias
195
+ - [ ] ` @phpstan-this-out ` - TODO
196
+ - [x] ` @phpstan-throws ` - Vendor-specific ` @throws ` alias
197
+ - [ ] ` @phpstan-type ` - TODO
198
+ - [ ] ` @phpstan-use ` - TODO
199
+ - [x] ` @phpstan-var ` - Vendor-specific ` @var ` alias
200
+
201
+ ### Phan Tags
202
+
203
+ - [ ] ` @phan-abstract ` - TODO
204
+ - [ ] ` @phan-assert ` - TODO
205
+ - [ ] ` @phan-assert-false-condition ` - TODO
206
+ - [ ] ` @phan-assert-if-false ` - TODO
207
+ - [ ] ` @phan-assert-if-true ` - TODO
208
+ - [ ] ` @phan-assert-true-condition ` - TODO
209
+ - [ ] ` @phan-closure-scope ` - TODO
210
+ - [ ] ` @phan-constructor-used-for-side-effects ` - TODO
211
+ - [x] ` @phan-extends ` - Vendor-specific ` @extends ` alias
212
+ - [ ] ` @phan-file-suppress ` - TODO
213
+ - [ ] ` @phan-forbid-undeclared-magic-methods ` - TODO
214
+ - [ ] ` @phan-forbid-undeclared-magic-properties ` - TODO
215
+ - [ ] ` @phan-hardcode-return-type ` - TODO
216
+ - [ ] ` @phan-immutable ` - TODO
217
+ - [x] ` @phan-inherits ` - Vendor-specific ` @extends ` alias
218
+ - [x] ` @phan-method ` - Vendor-specific ` @method ` alias
219
+ - [ ] ` @phan-mixin ` - TODO
220
+ - [ ] ` @phan-output-reference ` - TODO
221
+ - [ ] ` @phan-override ` - TODO
222
+ - [x] ` @phan-param ` - Vendor-specific ` @param ` alias
223
+ - [x] ` @phan-property ` - Vendor-specific ` @property ` alias
224
+ - [x] ` @phan-property-read ` - Vendor-specific ` @property-read ` alias
225
+ - [x] ` @phan-property-write ` - Vendor-specific ` @property-write ` alias
226
+ - [ ] ` @phan-pure ` - TODO
227
+ - [ ] ` @phan-read-only ` - TODO
228
+ - [ ] ` @phan-real-return ` - TODO
229
+ - [x] ` @phan-return ` - Vendor-specific ` @return ` alias
230
+ - [ ] ` @phan-side-effect-free ` - TODO
231
+ - [ ] ` @phan-suppress-current-line ` - TODO
232
+ - [ ] ` @phan-suppress-next-line ` - TODO
233
+ - [ ] ` @phan-suppress-next-next-line ` - TODO
234
+ - [ ] ` @phan-suppress-previous-line ` - TODO
235
+ - [x] ` @phan-template ` - Vendor-specific ` @template ` alias
236
+ - [ ] ` @phan-transient ` - TODO
237
+ - [ ] ` @phan-type ` - TODO
238
+ - [ ] ` @phan-unused-param ` - TODO
239
+ - [x] ` @phan-var ` - Vendor-specific ` @var ` alias
240
+ - [ ] ` @phan-write-only ` - TODO
241
+ - [ ] ` @phanclosurescope ` - TODO
242
+
33
243
## Quick Start
34
244
35
245
``` php
@@ -56,19 +266,17 @@ TypeLang\PHPDoc\DocBlock\DocBlock {
56
266
0 => TypeLang\PHPDoc\DocBlock\Description\Description {
57
267
#value: "Example description "
58
268
}
59
- 1 => TypeLang\PHPDoc\DocBlock\Tag\Tag {
60
- +description: TypeLang\PHPDoc\DocBlock\Description\Description {
61
- #value: "some"
62
- }
269
+ 1 => TypeLang\PHPDoc\DocBlock\Tag\SeeTag\SeeTag {
270
+ +description: null
63
271
+name: "see"
272
+ +ref: TypeLang\PHPDoc\DocBlock\Tag\Shared\Reference\TypeSymbolReference {
273
+ +type: TypeLang\Parser\Node\Stmt\NamedTypeNode { … }
274
+ }
64
275
}
65
276
2 => TypeLang\PHPDoc\DocBlock\Description\Description {
66
277
#value: " and blah-blah-blah.\n"
67
278
}
68
279
]
69
- +tags: array:1 [
70
- 0 => TypeLang\PHPDoc\DocBlock\Tag\Tag {}
71
- ]
72
280
}
73
281
+tags: array:3 [
74
282
0 => TypeLang\PHPDoc\DocBlock\Tag\Tag {
@@ -80,12 +288,12 @@ TypeLang\PHPDoc\DocBlock\DocBlock {
80
288
1 => TypeLang\PHPDoc\DocBlock\Tag\ReturnTag\ReturnTag {
81
289
+description: null
82
290
+name: "return"
83
- +type: TypeLang\Parser\Node\Stmt\NamedTypeNode { ... }
291
+ +type: TypeLang\Parser\Node\Stmt\NamedTypeNode { … }
84
292
}
85
293
2 => TypeLang\PHPDoc\DocBlock\Tag\ThrowsTag\ThrowsTag {
86
294
+description: null
87
295
+name: "throws"
88
- +type: TypeLang\Parser\Node\Stmt\NamedTypeNode { ... }
296
+ +type: TypeLang\Parser\Node\Stmt\NamedTypeNode { … }
89
297
}
90
298
]
91
299
}
0 commit comments