lesname / documentor
0.6.1
2025-05-16 10:52 UTC
Requires
- php: ^8.4.0
- lesname/value-object: ^0.5.0
Requires (Dev)
- phpstan/phpstan: ^2.0.0
- phpunit/phpunit: ^12.0.0
- squizlabs/php_codesniffer: ^3.7.0
- dev-main
- 0.6.1
- 0.6.0
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.20
- 0.2.19
- 0.2.18
- 0.2.17
- 0.2.16
- 0.2.15
- 0.2.14
- 0.2.13
- 0.2.12
- 0.2.11
- 0.2.10
- 0.2.9
- 0.2.8
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.24
- 0.1.23
- 0.1.22
- 0.1.21
- 0.1.20
- 0.1.19
- 0.1.18
- 0.1.17
- 0.1.16
- 0.1.15
- 0.1.14
- 0.1.13
- 0.1.12
- 0.1.11
- 0.1.10
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-development
This package is auto-updated.
Last update: 2025-05-16 11:01:01 UTC
README
Les Documentor is a library that helps read sources and transform it to type documents.
Current sources supported:
- ValueObjects
- OpenApi
Example
Value object
use LesDocumentor\Type\ClassPropertiesTypeDocumentor;
use LesValueObject\String\Format\EmailAddress;
$documentor = new ClassPropertiesTypeDocumentor();
$document = $documentor->document(EmailAddress::class);
Result:
StringTypeDocument
- reference: LesValueObject\String\Format\EmailAddress
- description: null
- nullable: false
- length
- minimal: 5
- maximal: 255
- format: null
- pattern: null
OpenApi
use LesDocumentor\Type\OpenApiTypeDocumentor;
$documentor = new OpenApiTypeDocumentor();
$document = $documentor->document(
[
"type" => "integer",
"minimum" => 100,
"maximum" => 600
],
);
Result:
NumberTypeDocument
- reference: null
- description: null
- nullable: false
- range
- minimal: 100
- maximal 500
- multipleOf: null
- format: null