Skip to content

Commit 663c809

Browse files
committed
Add phpstan, psalm and phan aliases tests and fix a little more (remove unecessary comments)
1 parent ad7d035 commit 663c809

64 files changed

Lines changed: 313 additions & 563 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Writerside/tl.tree

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
</toc-element>
141141
<toc-element toc-title="Psalm" topic="psalm-tags.md">
142142
<toc-element topic="psalm-allow-private-mutation-tag.md" wip="true" />
143-
<toc-element topic="psalm-api-tag.md" wip="true" />
143+
<toc-element topic="psalm-api-tag.md" />
144144
<toc-element topic="psalm-assert-tag.md" wip="true" />
145145
<toc-element topic="psalm-assert-if-false-tag.md" wip="true" />
146146
<toc-element topic="psalm-assert-if-true-tag.md" wip="true" />
@@ -150,55 +150,55 @@
150150
<toc-element topic="psalm-consistent-constructor-tag.md" wip="true" />
151151
<toc-element topic="psalm-consistent-templates-tag.md" wip="true" />
152152
<toc-element topic="psalm-external-mutation-free-tag.md" wip="true" />
153-
<toc-element topic="psalm-extends-tag.md" wip="true" />
153+
<toc-element topic="psalm-extends-tag.md" />
154154
<toc-element topic="psalm-flow-tag.md" wip="true" />
155155
<toc-element topic="psalm-if-this-is-tag.md" wip="true" />
156156
<toc-element topic="psalm-ignore-falsable-return-tag.md" wip="true" />
157157
<toc-element topic="psalm-ignore-nullable-return-tag.md" wip="true" />
158158
<toc-element topic="psalm-ignore-var-tag.md" wip="true" />
159159
<toc-element topic="psalm-ignore-variable-method-tag.md" wip="true" />
160160
<toc-element topic="psalm-ignore-variable-property-tag.md" wip="true" />
161-
<toc-element topic="psalm-immutable-tag.md" wip="true" />
162-
<toc-element topic="psalm-implements-tag.md" wip="true" />
161+
<toc-element topic="psalm-immutable-tag.md" />
162+
<toc-element topic="psalm-implements-tag.md" />
163163
<toc-element topic="psalm-import-type-tag.md" wip="true" />
164164
<toc-element topic="psalm-inheritors-tag.md" wip="true" />
165-
<toc-element topic="psalm-internal-tag.md" wip="true" />
166-
<toc-element topic="psalm-method-tag.md" wip="true" />
165+
<toc-element topic="psalm-internal-tag.md" />
166+
<toc-element topic="psalm-method-tag.md" />
167167
<toc-element topic="psalm-mutation-free-tag.md" wip="true" />
168168
<toc-element topic="psalm-no-seal-methods-tag.md" wip="true" />
169169
<toc-element topic="psalm-no-seal-properties-tag.md" wip="true" />
170170
<toc-element topic="psalm-override-method-visibility-tag.md" wip="true" />
171171
<toc-element topic="psalm-override-property-visibility-tag.md" wip="true" />
172-
<toc-element topic="psalm-param-tag.md" wip="true" />
173-
<toc-element topic="psalm-param-out-tag.md" wip="true" />
174-
<toc-element topic="psalm-property-tag.md" wip="true" />
175-
<toc-element topic="psalm-property-read-tag.md" wip="true" />
176-
<toc-element topic="psalm-property-write-tag.md" wip="true" />
172+
<toc-element topic="psalm-param-tag.md" />
173+
<toc-element topic="psalm-param-out-tag.md" />
174+
<toc-element topic="psalm-property-tag.md" />
175+
<toc-element topic="psalm-property-read-tag.md" />
176+
<toc-element topic="psalm-property-write-tag.md" />
177177
<toc-element topic="psalm-pure-tag.md" wip="true" />
178-
<toc-element topic="psalm-readonly-tag.md" wip="true" />
178+
<toc-element topic="psalm-readonly-tag.md" />
179179
<toc-element topic="psalm-readonly-allow-private-mutation-tag.md" wip="true" />
180-
<toc-element topic="psalm-require-extends-tag.md" wip="true" />
181-
<toc-element topic="psalm-require-implements-tag.md" wip="true" />
182-
<toc-element topic="psalm-return-tag.md" wip="true" />
180+
<toc-element topic="psalm-require-extends-tag.md" />
181+
<toc-element topic="psalm-require-implements-tag.md" />
182+
<toc-element topic="psalm-return-tag.md" />
183183
<toc-element topic="psalm-scope-this-tag.md" wip="true" />
184-
<toc-element topic="psalm-seal-methods-tag.md" wip="true" />
185-
<toc-element topic="psalm-seal-properties-tag.md" wip="true" />
184+
<toc-element topic="psalm-seal-methods-tag.md" />
185+
<toc-element topic="psalm-seal-properties-tag.md" />
186186
<toc-element topic="psalm-self-out-tag.md" wip="true" />
187187
<toc-element topic="psalm-stub-override-tag.md" wip="true" />
188-
<toc-element topic="psalm-suppress-tag.md" wip="true" />
188+
<toc-element topic="psalm-suppress-tag.md" />
189189
<toc-element topic="psalm-taint-escape-tag.md" wip="true" />
190190
<toc-element topic="psalm-taint-sink-tag.md" wip="true" />
191191
<toc-element topic="psalm-taint-source-tag.md" wip="true" />
192192
<toc-element topic="psalm-taint-specialize-tag.md" wip="true" />
193193
<toc-element topic="psalm-taint-unescape-tag.md" wip="true" />
194-
<toc-element topic="psalm-template-tag.md" wip="true" />
195-
<toc-element topic="psalm-template-contravariant-tag.md" wip="true" />
196-
<toc-element topic="psalm-template-covariant-tag.md" wip="true" />
194+
<toc-element topic="psalm-template-tag.md" />
195+
<toc-element topic="psalm-template-contravariant-tag.md" />
196+
<toc-element topic="psalm-template-covariant-tag.md" />
197197
<toc-element topic="psalm-this-out-tag.md" wip="true" />
198198
<toc-element topic="psalm-trace-tag.md" wip="true" />
199199
<toc-element topic="psalm-type-tag.md" wip="true" />
200-
<toc-element topic="psalm-use-tag.md" wip="true" />
201-
<toc-element topic="psalm-var-tag.md" wip="true" />
200+
<toc-element topic="psalm-use-tag.md" />
201+
<toc-element topic="psalm-var-tag.md" />
202202
<toc-element topic="psalm-variadic-tag.md" wip="true" />
203203
<toc-element topic="psalm-yield-tag.md" wip="true" />
204204
</toc-element>
@@ -208,79 +208,79 @@
208208
<toc-element topic="phpstan-assert-if-false-tag.md" wip="true" />
209209
<toc-element topic="phpstan-assert-if-true-tag.md" wip="true" />
210210
<toc-element topic="phpstan-consistent-constructor-tag.md" wip="true" />
211-
<toc-element topic="phpstan-extends-tag.md" wip="true" />
211+
<toc-element topic="phpstan-extends-tag.md" />
212212
<toc-element topic="phpstan-ignore-tag.md" wip="true" />
213213
<toc-element topic="phpstan-ignore-line-tag.md" wip="true" />
214214
<toc-element topic="phpstan-ignore-next-line-tag.md" wip="true" />
215-
<toc-element topic="phpstan-immutable-tag.md" wip="true" />
216-
<toc-element topic="phpstan-implements-tag.md" wip="true" />
215+
<toc-element topic="phpstan-immutable-tag.md" />
216+
<toc-element topic="phpstan-implements-tag.md" />
217217
<toc-element topic="phpstan-import-type-tag.md" wip="true" />
218218
<toc-element topic="phpstan-impure-tag.md" wip="true" />
219-
<toc-element topic="phpstan-method-tag.md" wip="true" />
220-
<toc-element topic="phpstan-param-tag.md" wip="true" />
221-
<toc-element topic="phpstan-param-closure-this-tag.md" wip="true" />
222-
<toc-element topic="phpstan-param-immediately-invoked-callable-tag.md" wip="true" />
223-
<toc-element topic="phpstan-param-later-invoked-callable-tag.md" wip="true" />
224-
<toc-element topic="phpstan-param-out-tag.md" wip="true" />
225-
<toc-element topic="phpstan-property-tag.md" wip="true" />
226-
<toc-element topic="phpstan-property-read-tag.md" wip="true" />
227-
<toc-element topic="phpstan-property-write-tag.md" wip="true" />
219+
<toc-element topic="phpstan-method-tag.md" />
220+
<toc-element topic="phpstan-param-tag.md" />
221+
<toc-element topic="phpstan-param-closure-this-tag.md" />
222+
<toc-element topic="phpstan-param-immediately-invoked-callable-tag.md" />
223+
<toc-element topic="phpstan-param-later-invoked-callable-tag.md" />
224+
<toc-element topic="phpstan-param-out-tag.md" />
225+
<toc-element topic="phpstan-property-tag.md" />
226+
<toc-element topic="phpstan-property-read-tag.md" />
227+
<toc-element topic="phpstan-property-write-tag.md" />
228228
<toc-element topic="phpstan-pure-tag.md" wip="true" />
229-
<toc-element topic="phpstan-pure-unless-callable-is-impure-tag.md" wip="true" />
230-
<toc-element topic="phpstan-readonly-tag.md" wip="true" />
229+
<toc-element topic="phpstan-pure-unless-callable-is-impure-tag.md" />
230+
<toc-element topic="phpstan-readonly-tag.md" />
231231
<toc-element topic="phpstan-readonly-allow-private-mutation-tag.md" wip="true" />
232-
<toc-element topic="phpstan-require-extends-tag.md" wip="true" />
233-
<toc-element topic="phpstan-require-implements-tag.md" wip="true" />
234-
<toc-element topic="phpstan-return-tag.md" wip="true" />
232+
<toc-element topic="phpstan-require-extends-tag.md" />
233+
<toc-element topic="phpstan-require-implements-tag.md" />
234+
<toc-element topic="phpstan-return-tag.md" />
235235
<toc-element topic="phpstan-self-out-tag.md" wip="true" />
236-
<toc-element topic="phpstan-template-tag.md" wip="true" />
237-
<toc-element topic="phpstan-template-contravariant-tag.md" wip="true" />
238-
<toc-element topic="phpstan-template-covariant-tag.md" wip="true" />
236+
<toc-element topic="phpstan-template-tag.md" />
237+
<toc-element topic="phpstan-template-contravariant-tag.md" />
238+
<toc-element topic="phpstan-template-covariant-tag.md" />
239239
<toc-element topic="phpstan-this-out-tag.md" wip="true" />
240-
<toc-element topic="phpstan-throws-tag.md" wip="true" />
240+
<toc-element topic="phpstan-throws-tag.md" />
241241
<toc-element topic="phpstan-type-tag.md" wip="true" />
242-
<toc-element topic="phpstan-use-tag.md" wip="true" />
243-
<toc-element topic="phpstan-var-tag.md" wip="true" />
242+
<toc-element topic="phpstan-use-tag.md" />
243+
<toc-element topic="phpstan-var-tag.md" />
244244
<toc-element topic="phpstan-yield-tag.md" wip="true" />
245245
</toc-element>
246246
<toc-element toc-title="Phan" topic="phan-tags.md">
247-
<toc-element topic="phan-abstract-tag.md" wip="true" />
247+
<toc-element topic="phan-abstract-tag.md" />
248248
<toc-element topic="phan-assert-tag.md" wip="true" />
249249
<toc-element topic="phan-assert-false-condition-tag.md" wip="true" />
250250
<toc-element topic="phan-assert-if-false-tag.md" wip="true" />
251251
<toc-element topic="phan-assert-if-true-tag.md" wip="true" />
252252
<toc-element topic="phan-assert-true-condition-tag.md" wip="true" />
253253
<toc-element topic="phan-closure-scope-tag.md" wip="true" />
254254
<toc-element topic="phan-constructor-used-for-side-effects-tag.md" wip="true" />
255-
<toc-element topic="phan-extends-tag.md" wip="true" />
255+
<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" wip="true" />
258258
<toc-element topic="phan-forbid-undeclared-magic-properties-tag.md" wip="true" />
259259
<toc-element topic="phan-hardcode-return-type-tag.md" wip="true" />
260-
<toc-element topic="phan-immutable-tag.md" wip="true" />
261-
<toc-element topic="phan-inherits-tag.md" wip="true" />
262-
<toc-element topic="phan-method-tag.md" wip="true" />
263-
<toc-element topic="phan-mixin-tag.md" wip="true" />
260+
<toc-element topic="phan-immutable-tag.md" />
261+
<toc-element topic="phan-inherits-tag.md" />
262+
<toc-element topic="phan-method-tag.md" />
263+
<toc-element topic="phan-mixin-tag.md" />
264264
<toc-element topic="phan-output-reference-tag.md" wip="true" />
265-
<toc-element topic="phan-override-tag.md" wip="true" />
266-
<toc-element topic="phan-param-tag.md" wip="true" />
267-
<toc-element topic="phan-property-tag.md" wip="true" />
268-
<toc-element topic="phan-property-read-tag.md" wip="true" />
269-
<toc-element topic="phan-property-write-tag.md" wip="true" />
265+
<toc-element topic="phan-override-tag.md" />
266+
<toc-element topic="phan-param-tag.md" />
267+
<toc-element topic="phan-property-tag.md" />
268+
<toc-element topic="phan-property-read-tag.md" />
269+
<toc-element topic="phan-property-write-tag.md" />
270270
<toc-element topic="phan-pure-tag.md" wip="true" />
271-
<toc-element topic="phan-read-only-tag.md" wip="true" />
271+
<toc-element topic="phan-read-only-tag.md" />
272272
<toc-element topic="phan-real-return-tag.md" wip="true" />
273-
<toc-element topic="phan-return-tag.md" wip="true" />
273+
<toc-element topic="phan-return-tag.md" />
274274
<toc-element topic="phan-side-effect-free-tag.md" wip="true" />
275275
<toc-element topic="phan-suppress-current-line-tag.md" wip="true" />
276276
<toc-element topic="phan-suppress-next-line-tag.md" wip="true" />
277277
<toc-element topic="phan-suppress-next-next-line-tag.md" wip="true" />
278278
<toc-element topic="phan-suppress-previous-line-tag.md" wip="true" />
279-
<toc-element topic="phan-template-tag.md" wip="true" />
279+
<toc-element topic="phan-template-tag.md" />
280280
<toc-element topic="phan-transient-tag.md" wip="true" />
281281
<toc-element topic="phan-type-tag.md" wip="true" />
282-
<toc-element topic="phan-unused-param-tag.md" wip="true" />
283-
<toc-element topic="phan-var-tag.md" wip="true" />
282+
<toc-element topic="phan-unused-param-tag.md" />
283+
<toc-element topic="phan-var-tag.md" />
284284
<toc-element topic="phan-write-only-tag.md" wip="true" />
285285
<toc-element topic="phanclosurescope-tag.md" wip="true" />
286286
</toc-element>

Writerside/topics/phpdoc/platforms.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ available; the platforms passed in extend it, each overriding an entry only when
5959
it reuses the same tag, alias or combinator name.
6060

6161
<note>
62-
Constructed without arguments, <code>DocBlockParser</code> loads the
63-
<code>PhpDocumentorPlatform</code> on top of the standard one, so the legacy
64-
phpDocumentor tags are recognized out of the box. Passing your own
65-
<code>platforms</code> replaces that default — re-add
66-
<code>new PhpDocumentorPlatform()</code> to the list if you still want those tags.
62+
Constructed without arguments, <code>DocBlockParser</code> loads all available
63+
platforms. Passing your own <code>platforms</code> replaces that
64+
default — re-add the ones you still want to the list.
6765
</note>
6866

6967
The definitions that end up registered are exposed as `$parser->tags` (a
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
# @phan-abstract
22

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

66
The `@phan-abstract` tag is Phan's vendor-specific `@abstract`
77
alias. It is the vendor-prefixed spelling of
88
[@abstract](abstract-tag.md), which this component already
99
recognizes bare.
1010

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

1915
See [Phan's Annotating Your Source Code wiki](https://github.com/phan/phan/wiki/Annotating-Your-Source-Code).
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
# @phan-extends
22

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

66
The `@phan-extends` tag is Phan's vendor-specific `@extends` alias.
77
It is the vendor-prefixed spelling of [@extends](extends-tag.md),
88
which this component already recognizes bare.
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 it as an alias: it parses identically to the
11+
canonical tag above and produces the exact same tag instance, keeping the
12+
vendor-prefixed name it was written with.
1713

1814
See [Phan's Annotating Your Source Code wiki](https://github.com/phan/phan/wiki/Annotating-Your-Source-Code).
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
# @phan-immutable
22

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

66
The `@phan-immutable` tag declares a class as immutable. Phan
77
documents it as an alias of `@phan-read-only` (see
88
phan-read-only-tag.md); this component's own not-yet-implemented
99
equivalent for the same concept is
1010
[@immutable](immutable-tag.md).
1111

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>
12+
This library recognizes it as an alias: it parses identically to the
13+
canonical tag above and produces the exact same tag instance, keeping the
14+
vendor-prefixed name it was written with.
1915

2016
See [Phan's Annotating Your Source Code wiki](https://github.com/phan/phan/wiki/Annotating-Your-Source-Code).
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
# @phan-inherits
22

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

66
The `@phan-inherits` tag is Phan's alias of `@extends`. It parallels
77
[@inherits](inherits-tag.md), the equivalent plain-English alias this
88
component already recognizes bare.
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 it as an alias: it parses identically to the
11+
canonical tag above and produces the exact same tag instance, keeping the
12+
vendor-prefixed name it was written with.
1713

1814
See [Phan's Annotating Your Source Code wiki](https://github.com/phan/phan/wiki/Annotating-Your-Source-Code).
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
# @phan-method
22

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

66
The `@phan-method` tag is Phan's vendor-specific `@method` alias. It
77
is the vendor-prefixed spelling of [@method](method-tag.md), which
88
this component already recognizes bare.
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 it as an alias: it parses identically to the
11+
canonical tag above and produces the exact same tag instance, keeping the
12+
vendor-prefixed name it was written with.
1713

1814
See [Phan's Annotating Your Source Code wiki](https://github.com/phan/phan/wiki/Annotating-Your-Source-Code).

0 commit comments

Comments
 (0)