tomrf/readme-gen

generates readme with public api documentation for php packages

0.0.9 2022-11-11 00:10 UTC

This package is auto-updated.

Last update: 2024-11-20 03:43:15 UTC


README

PHP Version Require Latest Stable Version License

Automatically generates a 📚 README file with public API documentation for a PHP package, based on docblocks and package information from composer.json

Included formatters:

  • Markdown

📔 Go to documentation

Installation

Installation via composer:

composer require tomrf/readme-gen

Usage

$readmeGen = new \Tomrf\ReadmeGen\ReadmeGen('.'); // path to project directory

echo $readmeGen->generate(
    new Tomrf\ReadmeGen\Formatter\MarkdownFormatter(
        \phpDocumentor\Reflection\DocBlockFactory::createInstance(),
        new \phpDocumentor\Reflection\Types\ContextFactory()
    ),
    'resources/template.md'
);

Testing

composer test

License

This project is released under the MIT License (MIT). See LICENSE for more information.

Documentation

📂 Tomrf\ReadmeGen\ReadmeGen::class

ReadmeGen.

Very much a work in progress.

__construct()

public function __construct(
    string $projectRoot
): void

generate()

public function generate(
    Tomrf\ReadmeGen\Interface\ReadmeFormatterInterface $formatter,
    string $templateFilename
): string

Generated 2022-06-15T22:33:50+02:00 using 📚tomrf/readme-gen