Skip to content

Commit 0b8fa83

Browse files
committed
Improve tag docs
1 parent e46a421 commit 0b8fa83

19 files changed

+43
-42
lines changed

Diff for: src/DocBlock/Tag/LinkTag/LinkTag.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
* relation defined by this occurrence.
1818
*
1919
* ```
20-
*
21-
* * @link [URI] [<description>]
20+
* "@link" [URI] [<description>]
2221
* ```
2322
* @link https://www.ietf.org/rfc/rfc2396.txt RFC2396
2423
*/

Diff for: src/DocBlock/Tag/MethodTag/MethodTag.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@
3636
* with a class or interface.
3737
*
3838
* ```
39-
*
40-
* * @method [static] <CallableType> [<description>]
41-
* * @method [static] <ReturnType> <CallableType> [<description>]
42-
* * @method [static] <CallableType>: <ReturnType> [<description>]
39+
* "@method" [static] <CallableType> [<description>]
40+
* "@method" [static] <ReturnType> <CallableType> [<description>]
41+
* "@method" [static] <CallableType>: <ReturnType> [<description>]
4342
* ```
4443
*/
4544
class MethodTag extends Tag implements OptionalTypeProviderInterface

Diff for: src/DocBlock/Tag/ParamTag/ParamTag.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
* limited to structural elements of type method or function.
2929
*
3030
* ```
31-
*
32-
* * @param [<Type>] $<variable> [<description>]
31+
* "@param" [<Type>] $<variable> [<description>]
3332
* ```
3433
*/
3534
class ParamTag extends Tag implements

Diff for: src/DocBlock/Tag/PropertyTag/PropertyReadTag.php

+5
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@
44

55
namespace TypeLang\PHPDoc\DocBlock\Tag\PropertyTag;
66

7+
/**
8+
* ```
9+
* "@property-read" [<Type>] $<name> [<description>]
10+
* ```
11+
*/
712
class PropertyReadTag extends PropertyTag {}

Diff for: src/DocBlock/Tag/PropertyTag/PropertyTag.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@
3030
* The "`@property`", "`@property-read`" and "`@property-write`" tags can ONLY
3131
* be used in a PHPDoc that is associated with a class or trait.
3232
*
33-
* - Also @see PropertyRead for "`@property-read`" tag implementation.
34-
* - Also @see PropertyWrite for "`@property-write`" tag implementation.
33+
* - Also {@see PropertyReadTag} for "`@property-read`" tag implementation.
34+
* - Also {@see PropertyWriteTag} for "`@property-write`" tag implementation.
3535
*
3636
* ```
37-
*
38-
* * @property[<-read|-write>] [<Type>] $<name> [<description>]
37+
* "@property" [<Type>] $<name> [<description>]
3938
* ```
4039
*/
4140
class PropertyTag extends Tag implements

Diff for: src/DocBlock/Tag/PropertyTag/PropertyWriteTag.php

+5
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@
44

55
namespace TypeLang\PHPDoc\DocBlock\Tag\PropertyTag;
66

7+
/**
8+
* ```
9+
* "@property-write" [<Type>] $<name> [<description>]
10+
* ```
11+
*/
712
class PropertyWriteTag extends PropertyTag {}

Diff for: src/DocBlock/Tag/ReturnTag/ReturnTag.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
* structural elements of type method or function.
3131
*
3232
* ```
33-
*
34-
* * @return [<Type>] [<description>]
33+
* "@return" [<Type>] [<description>]
3534
* ```
3635
*/
3736
class ReturnTag extends Tag implements TypeProviderInterface

Diff for: src/DocBlock/Tag/SeeTag/SeeTag.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
* The "`@see`" tag cannot refer to a namespace element.
2626
*
2727
* ```
28-
*
29-
* * @see [URI | FQN] [<description>]
28+
* "@see" [URI | FQN] [<description>]
3029
* ```
3130
*
3231
* @link https://www.ietf.org/rfc/rfc2396.txt RFC2396

Diff for: src/DocBlock/Tag/TemplateExtendsTag/TemplateExtendsTag.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
/**
88
* ```
9-
*
10-
* * @template-extends <Type> [<description>]
11-
* * @extends <Type> [<description>]
9+
* "@extends" <Type> [<description>]
1210
* ```
1311
*/
1412
class TemplateExtendsTag extends TemplateInheritanceTag {}

Diff for: src/DocBlock/Tag/TemplateExtendsTag/TemplateExtendsTagFactory.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
use TypeLang\PHPDoc\Parser\Description\DescriptionParserInterface;
1313

1414
/**
15-
* This class is responsible for creating "`@extends`"
16-
* or "`@template-extends`" tags.
15+
* This class is responsible for creating "`@extends`" tags.
1716
*
1817
* See {@see TemplateExtendsTag} for details about this tag.
1918
*/

Diff for: src/DocBlock/Tag/TemplateExtendsTag/TemplateImplementsTag.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
/**
88
* ```
9-
*
10-
* * @template-implements <Type> [<description>]
11-
* * @implements <Type> [<description>]
9+
* "@implements" <Type> [<description>]
1210
* ```
1311
*/
1412
class TemplateImplementsTag extends TemplateInheritanceTag {}

Diff for: src/DocBlock/Tag/TemplateExtendsTag/TemplateImplementsTagFactory.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
use TypeLang\PHPDoc\Parser\Description\DescriptionParserInterface;
1111

1212
/**
13-
* This class is responsible for creating "`@implements`"
14-
* or "`@template-implements`" tags.
13+
* This class is responsible for creating "`@implements`" tags.
1514
*
1615
* See {@see TemplateImplementsTag} for details about this tag.
1716
*/

Diff for: src/DocBlock/Tag/TemplateExtendsTag/TemplateUseTag.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66

77
/**
88
* ```
9-
*
10-
* * @template-use <Type> [<description>]
11-
*
12-
* * @use <Type> [<description>]
9+
* "@use" <Type> [<description>]
1310
* ```
1411
*/
1512
class TemplateUseTag extends TemplateInheritanceTag {}

Diff for: src/DocBlock/Tag/TemplateExtendsTag/TemplateUseTagFactory.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
use TypeLang\PHPDoc\Parser\Description\DescriptionParserInterface;
1111

1212
/**
13-
* This class is responsible for creating "`@use`"
14-
* or "`@template-use`" tags.
13+
* This class is responsible for creating "`@use`" tags.
1514
*
1615
* See {@see TemplateUseTag} for details about this tag.
1716
*/

Diff for: src/DocBlock/Tag/TemplateTag/TemplateContravariantTag.php

+5
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@
44

55
namespace TypeLang\PHPDoc\DocBlock\Tag\TemplateTag;
66

7+
/**
8+
* ```
9+
* "@template-contravariant" <name> ['of' <Type>] [<description>]
10+
* ```
11+
*/
712
final class TemplateContravariantTag extends TemplateTag {}

Diff for: src/DocBlock/Tag/TemplateTag/TemplateCovariantTag.php

+5
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@
44

55
namespace TypeLang\PHPDoc\DocBlock\Tag\TemplateTag;
66

7+
/**
8+
* ```
9+
* "@template-covariant" <name> ['of' <Type>] [<description>]
10+
* ```
11+
*/
712
final class TemplateCovariantTag extends TemplateTag {}

Diff for: src/DocBlock/Tag/TemplateTag/TemplateTag.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
/**
1212
* ```
13-
*
14-
* * @tempalte <name> ['of' <Type>] [<description>]
13+
* "@template" <name> ['of' <Type>] [<description>]
1514
* ```
1615
*/
1716
class TemplateTag extends Tag implements OptionalTypeProviderInterface

Diff for: src/DocBlock/Tag/ThrowsTag/ThrowsTag.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
* detailed view is created and the consumer knows for which errors to check.
2626
*
2727
* ```
28-
*
29-
* * @throws [<Type>] [<description>]
28+
* "@throws" [<Type>] [<description>]
3029
* ```
3130
*/
3231
class ThrowsTag extends Tag implements TypeProviderInterface

Diff for: src/DocBlock/Tag/VarTag/VarTag.php

+5-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@
2626
* while several items are represented.
2727
*
2828
* ```
29-
*
30-
* * @var [<Type>] $<variable> [<description>]
31-
* * @var [<Type>] ...$<variable> [<description>]
32-
* * @var [<Type>] &$<variable> [<description>]
33-
* * @var [<Type>] ...&$<variable> [<description>]
34-
* * @var [<Type>] &...$<variable> [<description>]
29+
* "@var" [<Type>] $<variable> [<description>]
30+
* "@var" [<Type>] ...$<variable> [<description>]
31+
* "@var" [<Type>] &$<variable> [<description>]
32+
* "@var" [<Type>] ...&$<variable> [<description>]
33+
* "@var" [<Type>] &...$<variable> [<description>]
3534
* ```
3635
*/
3736
class VarTag extends Tag implements

0 commit comments

Comments
 (0)