Download the PHP package zero-to-prod/docblock-annotator without Composer
On this page you can find all versions of the php package zero-to-prod/docblock-annotator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zero-to-prod/docblock-annotator
More information about zero-to-prod/docblock-annotator
Files in zero-to-prod/docblock-annotator
Package docblock-annotator
Short Description An annotator for PHP docblocks.
License MIT
Homepage https://github.com/zero-to-prod/docblock-annotator
Informations about the package docblock-annotator
Zerotoprod\DocblockAnnotator
Contents
- Introduction
- Requirements
- Installation
- Documentation Publishing
- Automatic Documentation Publishing
- Usage
- Instantiation
- updateDirectory
- updateFiles
- Local Development
- Contributing
Introduction
An annotator for PHP docblocks.
Requirements
- PHP 7.4 or higher.
Installation
Install Zerotoprod\DocblockAnnotator
via Composer:
This will add the package to your project's dependencies and create an autoloader entry for it.
Documentation Publishing
You can publish this README to your local documentation directory.
This can be useful for providing documentation for AI agents.
This can be done using the included script:
Automatic Documentation Publishing
You can automatically publish documentation by adding the following to your composer.json
:
Usage
Instantiation
Create a new DocblockAnnotator
instance with your desired configuration:
Arguments:
modifiers
: Array of visibility modifiers to targetpublic
protected
private
statements
: Array of statement types to processclass_method
const
class
class_const
enum_case
enum
function
trait
property
interface
success
: Callback function executed after successful file processingfailure
: Callback function executed when an error occursParser
: Optional PHP-Parser instance (defaults to host PHP version)
updateDirectory
Updates docblocks in all PHP files within a directory.
updateFiles
Updates docblocks for a specified array of files.
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page if you want to contribute.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
All versions of docblock-annotator with dependencies
nikic/php-parser Version ^5.0
zero-to-prod/filesystem Version ^0.1.0
zero-to-prod/docgen-visitor Version ^1.0
zero-to-prod/package-helper Version ^1.1.3