Skip to content

Commit cd04bb4

Browse files
committed
Add docs
1 parent 92ecf5d commit cd04bb4

20 files changed

Lines changed: 181 additions & 10 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ vendor/
1616
# By default the phpunit.xml.dist is provided; you can override this using a local config file
1717
phpunit.xml
1818
.phpunit.result.cache
19+
20+
.phpdoc

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ rector: ## Refactor code using rector
4141

4242
.PHONY: pre-commit-test
4343
pre-commit-test: fix-code-style test code-style static-code-analysis
44+
45+
.PHONY: docs
46+
docs: ## Generate documentation with phpDocumentor
47+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpdoc:3

docs/contributing.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Contributing
2+
============
3+
4+
Contributions are welcome! If you would like to contribute to ReflectionDocBlock, please follow these guidelines:
5+
6+
- Fork the repository and create your branch from ``main``.
7+
- Ensure your code follows the project's coding standards.
8+
- Write tests for your changes.
9+
- Submit a pull request with a clear description of your changes.
10+
11+
For questions or discussions, please open an issue on GitHub.
12+

examples/01-interpreting-a-simple-docblock.php renamed to docs/examples/01-interpreting-a-simple-docblock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require_once(__DIR__ . '/../vendor/autoload.php');
2+
require_once(__DIR__ . '/../../vendor/autoload.php');
33

44
use phpDocumentor\Reflection\DocBlockFactory;
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require_once(__DIR__ . '/../vendor/autoload.php');
2+
require_once(__DIR__ . '/../../vendor/autoload.php');
33

44
use phpDocumentor\Reflection\DocBlockFactory;
55

examples/03-reconstituting-a-docblock.php renamed to docs/examples/03-reconstituting-a-docblock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once(__DIR__ . '/../vendor/autoload.php');
3+
require_once(__DIR__ . '/../../vendor/autoload.php');
44

55
use phpDocumentor\Reflection\DocBlock\Serializer;
66
use phpDocumentor\Reflection\DocBlockFactory;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* In this example we demonstrate how you can add your own Tag using a Static Factory method in your Tag class.
44
*/
55

6-
require_once(__DIR__ . '/../vendor/autoload.php');
6+
require_once(__DIR__ . '/../../vendor/autoload.php');
77

88
use phpDocumentor\Reflection\DocBlock\Serializer;
99
use phpDocumentor\Reflection\DocBlock\Tag;

examples/playing-with-descriptions/02-escaping.php renamed to docs/examples/playing-with-descriptions/02-escaping.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once(__DIR__ . '/../../vendor/autoload.php');
3+
require_once(__DIR__ . '/../../../vendor/autoload.php');
44

55
use phpDocumentor\Reflection\DocBlockFactory;
66

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
How to Add Your Own Tag
2+
=======================
3+
4+
This guide demonstrates how to add your own custom tag to a DocBlock using ReflectionDocBlock.
5+
6+
.. literalinclude:: ../examples/04-adding-your-own-tag.php
7+
:language: php
8+
:linenos:
9+

docs/how-to/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
How-to Guides
2+
=============
3+
4+
Practical guides for common tasks with ReflectionDocBlock:
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
9+
interpreting-a-simple-docblock
10+
interpreting-tags
11+
reconstituting-a-docblock
12+
adding-your-own-tag
13+

0 commit comments

Comments
 (0)