klitsche/dog
Dog is a lightweight source code documentation generator for PHP libraries. Built on phpDocumentor/reflection and Twig, it analyzes code and phpdoc, validates documentation with configurable rules, and outputs Markdown suitable for MkDocs and similar tools.
Dog is a slim source code documentation generator for PHP libraries. It´s a thin layer around phpdocumentor/reflection and twig.
WIP: Expect breaking changes along all 0.* pre-releases.
Suggested:
phploc dataclover coverage dataAdd to your project:
composer require --dev klitsche/dog
Create config file .dog.yml in your project root directory and edit it.
Example:
# Title of index page
title: 'Overview'
# Relative or absolute paths to source files - plus patterns to include or exclude path pr files
srcPaths:
'src':
'/.*\.php$/': true
# Add new or change validation rules - omit completely to use default set
rules:
PublicFileDocBlockMissingRule:
class: 'Klitsche\Dog\Analyzer\Rules\DocBlockMissingRule'
issueLevel: 'ignore'
match:
getElementType: 'File'
# Configure enrichers to add extra data to project or element items
enrichers:
clover:
class: \Klitsche\Dog\Enrichers\Clover\CloverEnricher
file: clover.xml
# FQCN for template printer class
printerClass: 'Klitsche\Dog\Printer\Markdown\Printer'
# Relative or absolute path to output directory
outputDir: 'docs/api'
# Enable or disable debug mode - helps when tweaking templates
debug: false
Analyze code and phpdoc first, then generate documentation:
vendor/bin/dog
Analyze code & phpdoc and find potential documentation issues without generating documentation:
vendor/bin/dog --analyze
Generate documentation without analyzing it first:
vendor/bin/dog --generate
https://klitsche.github.io/dog/
How can I help you explore Laravel packages today?