Skip to content

Commit da3c60d

Browse files
authored
Merge pull request #432 from phpDocumentor/docs
Add docs
2 parents 92ecf5d + febafae commit da3c60d

21 files changed

+198
-10
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# https://docs.github.com/en/actions
2+
3+
name: "Documentation"
4+
5+
on: # yamllint disable-line rule:truthy
6+
push:
7+
branches:
8+
- "6.x"
9+
workflow_dispatch: null
10+
11+
jobs:
12+
run:
13+
name: "Documentation"
14+
uses: "phpDocumentor/.github/.github/workflows/documentation.yml@main"
15+
with:
16+
deploy: true
17+
component: "reflection-docblock"

.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+

0 commit comments

Comments
 (0)