File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818
1919The PHP reference implementation for Type Language PhpDoc Parser.
2020
21- Read [ documentation pages] ( https://phpdoc.io ) for more information.
22-
23- ## Installation
24-
25- PhpDoc Generator is available as composer repository and can be
26- installed using the following command in a root of your project:
27-
28- ``` sh
29- $ composer require type-lang/phpdoc
30- ```
31-
32- ## Quick Start
33-
34- ``` php
35- use TypeLang\PHPDoc\DocBlockFactory;
36-
37- $phpdoc = DocBlockFactory::createInstance()
38- ->create(<<<'PHP'
39- /**
40- * Example description.
41- *
42- * @param non-empty-string $foo Foo param.
43- * @param int<0 , max > $bar Bar param.
44- *
45- * @return void Returns nothing.
46- */
47- PHP);
48-
49- echo $phpdoc->getDescription() . "\n";
50- // Output: string("Example description.\n")
51-
52- foreach ($phpdoc->getTags() as $tag) {
53- echo $tag->getName() . ': '
54- . $tag->getDescription() . "\n";
55- // Output 3 lines:
56- // param: Foo param.
57- // param: Bar param.
58- // return: Returns nothing.
59- }
60- ```
61-
62- ### Supported Tags
63-
21+ ## Resources
6422
23+ - [ Documentation] ( https://phpdoc.io )
You can’t perform that action at this time.
0 commit comments