Skip to content

Commit 157c3ef

Browse files
committed
Fix comment typo
1 parent 45856c2 commit 157c3ef

26 files changed

Lines changed: 299 additions & 233 deletions

Writerside/tl.tree

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,18 @@
141141
<toc-element toc-title="Psalm" topic="psalm-tags.md">
142142
<toc-element topic="psalm-allow-private-mutation-tag.md" />
143143
<toc-element topic="psalm-api-tag.md" />
144-
<toc-element topic="psalm-assert-tag.md" wip="true" />
145-
<toc-element topic="psalm-assert-if-false-tag.md" wip="true" />
146-
<toc-element topic="psalm-assert-if-true-tag.md" wip="true" />
147-
<toc-element topic="psalm-assert-untainted-tag.md" wip="true" />
144+
<toc-element topic="psalm-assert-tag.md" />
145+
<toc-element topic="psalm-assert-if-false-tag.md" />
146+
<toc-element topic="psalm-assert-if-true-tag.md" />
147+
<toc-element topic="psalm-assert-untainted-tag.md" />
148148
<toc-element topic="psalm-check-type-tag.md" wip="true" />
149149
<toc-element topic="psalm-check-type-exact-tag.md" wip="true" />
150150
<toc-element topic="psalm-consistent-constructor-tag.md" />
151151
<toc-element topic="psalm-consistent-templates-tag.md" />
152152
<toc-element topic="psalm-external-mutation-free-tag.md" />
153153
<toc-element topic="psalm-extends-tag.md" />
154154
<toc-element topic="psalm-flow-tag.md" wip="true" />
155-
<toc-element topic="psalm-if-this-is-tag.md" wip="true" />
155+
<toc-element topic="psalm-if-this-is-tag.md" />
156156
<toc-element topic="psalm-ignore-falsable-return-tag.md" />
157157
<toc-element topic="psalm-ignore-nullable-return-tag.md" />
158158
<toc-element topic="psalm-ignore-var-tag.md" />
@@ -161,7 +161,7 @@
161161
<toc-element topic="psalm-immutable-tag.md" />
162162
<toc-element topic="psalm-implements-tag.md" />
163163
<toc-element topic="psalm-import-type-tag.md" wip="true" />
164-
<toc-element topic="psalm-inheritors-tag.md" wip="true" />
164+
<toc-element topic="psalm-inheritors-tag.md" />
165165
<toc-element topic="psalm-internal-tag.md" />
166166
<toc-element topic="psalm-method-tag.md" />
167167
<toc-element topic="psalm-mutation-free-tag.md" />
@@ -180,10 +180,10 @@
180180
<toc-element topic="psalm-require-extends-tag.md" />
181181
<toc-element topic="psalm-require-implements-tag.md" />
182182
<toc-element topic="psalm-return-tag.md" />
183-
<toc-element topic="psalm-scope-this-tag.md" wip="true" />
183+
<toc-element topic="psalm-scope-this-tag.md" />
184184
<toc-element topic="psalm-seal-methods-tag.md" />
185185
<toc-element topic="psalm-seal-properties-tag.md" />
186-
<toc-element topic="psalm-self-out-tag.md" wip="true" />
186+
<toc-element topic="psalm-self-out-tag.md" />
187187
<toc-element topic="psalm-stub-override-tag.md" />
188188
<toc-element topic="psalm-suppress-tag.md" />
189189
<toc-element topic="psalm-taint-escape-tag.md" wip="true" />
@@ -194,19 +194,19 @@
194194
<toc-element topic="psalm-template-tag.md" />
195195
<toc-element topic="psalm-template-contravariant-tag.md" />
196196
<toc-element topic="psalm-template-covariant-tag.md" />
197-
<toc-element topic="psalm-this-out-tag.md" wip="true" />
198-
<toc-element topic="psalm-trace-tag.md" wip="true" />
197+
<toc-element topic="psalm-this-out-tag.md" />
198+
<toc-element topic="psalm-trace-tag.md" />
199199
<toc-element topic="psalm-type-tag.md" wip="true" />
200200
<toc-element topic="psalm-use-tag.md" />
201201
<toc-element topic="psalm-var-tag.md" />
202202
<toc-element topic="psalm-variadic-tag.md" />
203-
<toc-element topic="psalm-yield-tag.md" wip="true" />
203+
<toc-element topic="psalm-yield-tag.md" />
204204
</toc-element>
205205
<toc-element toc-title="PHPStan" topic="phpstan-tags.md">
206206
<toc-element topic="phpstan-allow-private-mutation-tag.md" />
207-
<toc-element topic="phpstan-assert-tag.md" wip="true" />
208-
<toc-element topic="phpstan-assert-if-false-tag.md" wip="true" />
209-
<toc-element topic="phpstan-assert-if-true-tag.md" wip="true" />
207+
<toc-element topic="phpstan-assert-tag.md" />
208+
<toc-element topic="phpstan-assert-if-false-tag.md" />
209+
<toc-element topic="phpstan-assert-if-true-tag.md" />
210210
<toc-element topic="phpstan-consistent-constructor-tag.md" />
211211
<toc-element topic="phpstan-extends-tag.md" />
212212
<toc-element topic="phpstan-ignore-tag.md" wip="true" />
@@ -232,31 +232,31 @@
232232
<toc-element topic="phpstan-require-extends-tag.md" />
233233
<toc-element topic="phpstan-require-implements-tag.md" />
234234
<toc-element topic="phpstan-return-tag.md" />
235-
<toc-element topic="phpstan-self-out-tag.md" wip="true" />
235+
<toc-element topic="phpstan-self-out-tag.md" />
236236
<toc-element topic="phpstan-template-tag.md" />
237237
<toc-element topic="phpstan-template-contravariant-tag.md" />
238238
<toc-element topic="phpstan-template-covariant-tag.md" />
239-
<toc-element topic="phpstan-this-out-tag.md" wip="true" />
239+
<toc-element topic="phpstan-this-out-tag.md" />
240240
<toc-element topic="phpstan-throws-tag.md" />
241241
<toc-element topic="phpstan-type-tag.md" wip="true" />
242242
<toc-element topic="phpstan-use-tag.md" />
243243
<toc-element topic="phpstan-var-tag.md" />
244-
<toc-element topic="phpstan-yield-tag.md" wip="true" />
244+
<toc-element topic="phpstan-yield-tag.md" />
245245
</toc-element>
246246
<toc-element toc-title="Phan" topic="phan-tags.md">
247247
<toc-element topic="phan-abstract-tag.md" />
248-
<toc-element topic="phan-assert-tag.md" wip="true" />
248+
<toc-element topic="phan-assert-tag.md" />
249249
<toc-element topic="phan-assert-false-condition-tag.md" wip="true" />
250-
<toc-element topic="phan-assert-if-false-tag.md" wip="true" />
251-
<toc-element topic="phan-assert-if-true-tag.md" wip="true" />
250+
<toc-element topic="phan-assert-if-false-tag.md" />
251+
<toc-element topic="phan-assert-if-true-tag.md" />
252252
<toc-element topic="phan-assert-true-condition-tag.md" wip="true" />
253-
<toc-element topic="phan-closure-scope-tag.md" wip="true" />
253+
<toc-element topic="phan-closure-scope-tag.md" />
254254
<toc-element topic="phan-constructor-used-for-side-effects-tag.md" />
255255
<toc-element topic="phan-extends-tag.md" />
256256
<toc-element topic="phan-file-suppress-tag.md" wip="true" />
257257
<toc-element topic="phan-forbid-undeclared-magic-methods-tag.md" />
258258
<toc-element topic="phan-forbid-undeclared-magic-properties-tag.md" />
259-
<toc-element topic="phan-hardcode-return-type-tag.md" wip="true" />
259+
<toc-element topic="phan-hardcode-return-type-tag.md" />
260260
<toc-element topic="phan-immutable-tag.md" />
261261
<toc-element topic="phan-inherits-tag.md" />
262262
<toc-element topic="phan-method-tag.md" />
@@ -269,7 +269,7 @@
269269
<toc-element topic="phan-property-write-tag.md" />
270270
<toc-element topic="phan-pure-tag.md" />
271271
<toc-element topic="phan-read-only-tag.md" />
272-
<toc-element topic="phan-real-return-tag.md" wip="true" />
272+
<toc-element topic="phan-real-return-tag.md" />
273273
<toc-element topic="phan-return-tag.md" />
274274
<toc-element topic="phan-side-effect-free-tag.md" />
275275
<toc-element topic="phan-suppress-current-line-tag.md" wip="true" />
@@ -282,12 +282,12 @@
282282
<toc-element topic="phan-unused-param-tag.md" />
283283
<toc-element topic="phan-var-tag.md" />
284284
<toc-element topic="phan-write-only-tag.md" />
285-
<toc-element topic="phanclosurescope-tag.md" wip="true" />
285+
<toc-element topic="phanclosurescope-tag.md" />
286286
</toc-element>
287287
<toc-element toc-title="PhpStorm" topic="phpstorm-tags.md">
288288
<toc-element topic="noinspection-tag.md" wip="true" />
289289
<toc-element topic="language-tag.md" wip="true" />
290-
<toc-element topic="expected-exception-tag.md" wip="true" />
290+
<toc-element topic="expected-exception-tag.md" />
291291
<toc-element topic="formatter-off-tag.md" />
292292
<toc-element topic="formatter-on-tag.md" />
293293
</toc-element>
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# @expectedException
22

33
<primary-label ref="phpdoc-component"/>
4-
<secondary-label ref="not-implemented"/>
54

65
The `@expectedException` tag declares the `Throwable` a test method is
76
expected to throw. It is an old PHPUnit-era convention that predates the
@@ -11,12 +10,12 @@ expected to throw. It is an old PHPUnit-era convention that predates the
1110
"@expectedException" <Type> [ <Description> ]
1211
```
1312

14-
<note>
15-
Not yet recognized by <code>TypeLang\PhpDoc\DocBlockParser</code> — parsing
16-
a docblock containing this tag returns a plain <code>Tag</code>, its whole
17-
suffix folded into the description. See
18-
<a href="custom-tags.md">Custom Tags</a> for the current workaround if you
19-
need to recognize it yourself.
20-
</note>
13+
Parsing a `@expectedException` tag produces a `ExpectedExceptionTag` instance, carrying the
14+
parsed `$type` alongside the `$name` and optional `$description` every
15+
[Tag](phpdoc.md#tag) already provides.
16+
17+
```php
18+
final class ExpectedExceptionTag extends TypedTag {}
19+
```
2120

2221
A historical PHPUnit convention, not a PhpStorm tag.
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
# @phan-assert-if-false
22

33
<primary-label ref="phpdoc-component"/>
4-
<secondary-label ref="not-implemented"/>
54

65
The `@phan-assert-if-false` tag asserts the given type for an
76
argument or variable when the function returns `false`. It belongs
87
to the same assertion family as [@phan-assert](phan-assert-tag.md)
98
and its counterpart
109
[@phan-assert-if-true](phan-assert-if-true-tag.md).
1110

12-
<note>
13-
Not yet recognized by <code>TypeLang\PhpDoc\DocBlockParser</code> — parsing
14-
a docblock containing this tag returns a plain <code>Tag</code>, its whole
15-
suffix folded into the description. See
16-
<a href="custom-tags.md">Custom Tags</a> for the current workaround if you
17-
need to recognize it yourself.
18-
</note>
11+
```
12+
"@phan-assert-if-false" <Type> <Variable> [ <Description> ]
13+
```
14+
15+
Parsing a `@phan-assert-if-false` tag produces an `AssertIfFalseTag` instance, carrying the
16+
asserted `$type` and `$variable` alongside the `$name` and optional
17+
`$description` every [Tag](phpdoc.md#tag) already provides.
18+
19+
```php
20+
final class AssertIfFalseTag extends TypedVariableTag {}
21+
```
22+
23+
The same `AssertIfFalseTag` is produced by [@psalm-assert-if-false](psalm-assert-if-false-tag.md) and [@phpstan-assert-if-false](phpstan-assert-if-false-tag.md), which restate the same
24+
assertion for their respective tools.
1925

2026
Defined by Phan; see the "Assertions" section of
2127
[Phan's Annotating Your Source Code wiki](https://github.com/phan/phan/wiki/Annotating-Your-Source-Code).
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
# @phan-assert-if-true
22

33
<primary-label ref="phpdoc-component"/>
4-
<secondary-label ref="not-implemented"/>
54

65
The `@phan-assert-if-true` tag asserts the given type for an
76
argument or variable when the function returns `true`. It belongs
87
to the same assertion family as [@phan-assert](phan-assert-tag.md)
98
and its counterpart
109
[@phan-assert-if-false](phan-assert-if-false-tag.md).
1110

12-
<note>
13-
Not yet recognized by <code>TypeLang\PhpDoc\DocBlockParser</code> — parsing
14-
a docblock containing this tag returns a plain <code>Tag</code>, its whole
15-
suffix folded into the description. See
16-
<a href="custom-tags.md">Custom Tags</a> for the current workaround if you
17-
need to recognize it yourself.
18-
</note>
11+
```
12+
"@phan-assert-if-true" <Type> <Variable> [ <Description> ]
13+
```
14+
15+
Parsing a `@phan-assert-if-true` tag produces an `AssertIfTrueTag` instance, carrying the
16+
asserted `$type` and `$variable` alongside the `$name` and optional
17+
`$description` every [Tag](phpdoc.md#tag) already provides.
18+
19+
```php
20+
final class AssertIfTrueTag extends TypedVariableTag {}
21+
```
22+
23+
The same `AssertIfTrueTag` is produced by [@psalm-assert-if-true](psalm-assert-if-true-tag.md) and [@phpstan-assert-if-true](phpstan-assert-if-true-tag.md), which restate the same
24+
assertion for their respective tools.
1925

2026
Defined by Phan; see the "Assertions" section of
2127
[Phan's Annotating Your Source Code wiki](https://github.com/phan/phan/wiki/Annotating-Your-Source-Code).
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# @phan-assert
22

33
<primary-label ref="phpdoc-component"/>
4-
<secondary-label ref="not-implemented"/>
54

65
The `@phan-assert` tag asserts that an argument or variable is
76
narrowed to a given type after the call returns. Phan documents it
@@ -10,13 +9,20 @@ siblings — see [@phan-assert-if-true](phan-assert-if-true-tag.md) and
109
[@phan-assert-if-false](phan-assert-if-false-tag.md) — as part of the
1110
same assertion family.
1211

13-
<note>
14-
Not yet recognized by <code>TypeLang\PhpDoc\DocBlockParser</code> — parsing
15-
a docblock containing this tag returns a plain <code>Tag</code>, its whole
16-
suffix folded into the description. See
17-
<a href="custom-tags.md">Custom Tags</a> for the current workaround if you
18-
need to recognize it yourself.
19-
</note>
12+
```
13+
"@phan-assert" <Type> <Variable> [ <Description> ]
14+
```
15+
16+
Parsing a `@phan-assert` tag produces an `AssertTag` instance, carrying the
17+
asserted `$type` and `$variable` alongside the `$name` and optional
18+
`$description` every [Tag](phpdoc.md#tag) already provides.
19+
20+
```php
21+
final class AssertTag extends TypedVariableTag {}
22+
```
23+
24+
The same `AssertTag` is produced by [@psalm-assert](psalm-assert-tag.md) and [@phpstan-assert](phpstan-assert-tag.md), which restate the same
25+
assertion for their respective tools.
2026

2127
Defined by Phan; see the "Assertions" section of
2228
[Phan's Annotating Your Source Code wiki](https://github.com/phan/phan/wiki/Annotating-Your-Source-Code).
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# @phan-closure-scope
22

33
<primary-label ref="phpdoc-component"/>
4-
<secondary-label ref="not-implemented"/>
54

65
The `@phan-closure-scope` tag binds the type of `$this` inside a
76
`Closure`, letting Phan analyze the closure's body as though it were
@@ -11,12 +10,12 @@ bound to an instance of the given class.
1110
"@phan-closure-scope" <Type>
1211
```
1312

14-
<note>
15-
Not yet recognized by <code>TypeLang\PhpDoc\DocBlockParser</code> — parsing
16-
a docblock containing this tag returns a plain <code>Tag</code>, its whole
17-
suffix folded into the description. See
18-
<a href="custom-tags.md">Custom Tags</a> for the current workaround if you
19-
need to recognize it yourself.
20-
</note>
13+
Parsing a `@phan-closure-scope` tag produces a `PhanClosureScopeTag` instance, carrying the
14+
parsed `$type` alongside the `$name` and optional `$description` every
15+
[Tag](phpdoc.md#tag) already provides.
16+
17+
```php
18+
final class PhanClosureScopeTag extends TypedTag {}
19+
```
2120

2221
Defined by [Phan's Annotating Your Source Code wiki](https://github.com/phan/phan/wiki/Annotating-Your-Source-Code#phan-closure-scope).
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
# @phan-hardcode-return-type
22

33
<primary-label ref="phpdoc-component"/>
4-
<secondary-label ref="not-implemented"/>
54

65
The `@phan-hardcode-return-type` tag forces Phan to use the
76
documented return type instead of the type it would otherwise infer
87
from the method body.
98

10-
<note>
11-
Not yet recognized by <code>TypeLang\PhpDoc\DocBlockParser</code> — parsing
12-
a docblock containing this tag returns a plain <code>Tag</code>, its whole
13-
suffix folded into the description. See
14-
<a href="custom-tags.md">Custom Tags</a> for the current workaround if you
15-
need to recognize it yourself.
16-
</note>
9+
```
10+
"@phan-hardcode-return-type" <Type> [ <Description> ]
11+
```
12+
13+
Parsing a `@phan-hardcode-return-type` tag produces a `PhanHardcodeReturnTypeTag` instance, carrying the
14+
parsed `$type` alongside the `$name` and optional `$description` every
15+
[Tag](phpdoc.md#tag) already provides.
16+
17+
```php
18+
final class PhanHardcodeReturnTypeTag extends TypedTag {}
19+
```
1720

1821
Defined by Phan.
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
# @phan-real-return
22

33
<primary-label ref="phpdoc-component"/>
4-
<secondary-label ref="not-implemented"/>
54

65
The `@phan-real-return` tag documents the actual native return
76
type of a function or method, kept distinct from the type
87
documented via [@return](return-tag.md).
98

10-
<note>
11-
Not yet recognized by <code>TypeLang\PhpDoc\DocBlockParser</code> — parsing
12-
a docblock containing this tag returns a plain <code>Tag</code>, its whole
13-
suffix folded into the description. See
14-
<a href="custom-tags.md">Custom Tags</a> for the current workaround if you
15-
need to recognize it yourself.
16-
</note>
9+
```
10+
"@phan-real-return" <Type> [ <Description> ]
11+
```
12+
13+
Parsing a `@phan-real-return` tag produces a `PhanRealReturnTag` instance, carrying the
14+
parsed `$type` alongside the `$name` and optional `$description` every
15+
[Tag](phpdoc.md#tag) already provides.
16+
17+
```php
18+
final class PhanRealReturnTag extends TypedTag {}
19+
```
1720

1821
Defined by Phan, a static analyzer for PHP; no dedicated
1922
documentation page could be confirmed for this tag.
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
# @phanclosurescope
22

33
<primary-label ref="phpdoc-component"/>
4-
<secondary-label ref="not-implemented"/>
4+
<secondary-label ref="alias-tag"/>
55

66
The `@phanclosurescope` tag is an older alias of
77
[@phan-closure-scope](phan-closure-scope-tag.md), binding the
88
type of `$this` inside a `Closure`.
99

10-
<note>
11-
Not yet recognized by <code>TypeLang\PhpDoc\DocBlockParser</code> — parsing
12-
a docblock containing this tag returns a plain <code>Tag</code>, its whole
13-
suffix folded into the description. See
14-
<a href="custom-tags.md">Custom Tags</a> for the current workaround if you
15-
need to recognize it yourself.
16-
</note>
10+
This library recognizes `@phanclosurescope` as an alias of the canonical
11+
[@phan-closure-scope](phan-closure-scope-tag.md) tag: it parses identically and produces
12+
the exact same tag instance, keeping the vendor-prefixed name it was
13+
written with.
1714

1815
Defined by [Phan](https://github.com/phan/phan/wiki/Annotating-Your-Source-Code).

0 commit comments

Comments
 (0)