lesname / documentor
0.7.2
2026-04-01 21:19 UTC
Requires
- php: ^8.4.0
- lesname/value-object: ^0.6.3
Requires (Dev)
- phpstan/extension-installer: ^1.4.0
- phpstan/phpstan: ^2.0.0
- phpstan/phpstan-deprecation-rules: ^2.0.0
- phpunit/phpunit: ^12.0.0
- squizlabs/php_codesniffer: ^4.0.0
This package is auto-updated.
Last update: 2026-05-31 21:53:16 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