Skip to content

Commit 3cfbc88

Browse files
committed
Improve phpdoc doc page
1 parent c5456e2 commit 3cfbc88

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Writerside/topics/phpdoc.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,57 @@ $block = $parser->parse(<<<'PHPDOC'
6161
* @return bool
6262
*/
6363
PHPDOC);
64+
65+
var_dump($block);
66+
```
67+
68+
```
69+
TypeLang\PhpDoc\DocBlock\DocBlock {
70+
+tags: array:3 [
71+
0 => TypeLang\PhpDoc\DocBlock\Tag\SeeTag\SeeTag {
72+
+name: "see"
73+
+description: TypeLang\PhpDoc\DocBlock\Description\Description {
74+
+value: "The underlying transport."
75+
}
76+
+reference: TypeLang\PhpDoc\DocBlock\Reference\ClassMethodReference {
77+
+isExternal: false
78+
+class: "Mailer"
79+
+name: "send"
80+
}
81+
}
82+
1 => TypeLang\PhpDoc\DocBlock\Tag\LinkTag\LinkTag {
83+
+name: "link"
84+
+description: TypeLang\PhpDoc\DocBlock\Description\Description {
85+
+value: "Delivery documentation."
86+
}
87+
+reference: TypeLang\PhpDoc\DocBlock\Reference\UriReference {
88+
+isExternal: true
89+
+uri: "https://example.com/docs"
90+
}
91+
}
92+
2 => TypeLang\PhpDoc\DocBlock\Tag\ReturnTag\ReturnTag {
93+
+name: "return"
94+
+description: null
95+
+type: TypeLang\Type\NamedTypeNode {
96+
+name: TypeLang\Type\Name {
97+
+segments: array:1 [
98+
0 => TypeLang\Type\Identifier {
99+
+value: "bool"
100+
}
101+
]
102+
+isFullyQualified: false
103+
}
104+
+arguments: null
105+
+fields: null
106+
}
107+
}
108+
]
109+
+description: TypeLang\PhpDoc\DocBlock\Description\Description {
110+
+value: "Sends a notification to the given recipient.\n"
111+
}
112+
}
64113
```
114+
{collapsible="true" collapsed-title="Result"}
65115

66116
The description — everything written before the first tag — is available as
67117
`$block->description`, and the tags themselves form an ordered, countable,

0 commit comments

Comments
 (0)