sinsquare/phpdoc-formatter
Composer 安装命令:
composer require sinsquare/phpdoc-formatter
包简介
A tool to automatically fix phpDocumentor tags and annotations
README 文档
README
A simple tool for formatting PHPDoc
The tool currently fixes:
- Idention through multiline comments
- Removing more than 2 empty lines
- Fixing PHPDoc format
Usage:
phpdoc-formatter [--option value] [/path/to/project ...]
Options:
--exclude (-e) Exclude path(s)
ex: --exclude vendor,library
--version (-v) Displays the version
--ident (-i) Sets the ident character(s)
ex: --ident " "
--newline (-n) Sets the newline character(s)
ex: --ident "\r\n"
--help (-h) Displays this message
Example:
Before:
/**
* @SWG\Info(
* title="API",
* version="1.0"
* )
*
* @SWG\Swagger(
* host=API_HOST,
* basePath=API_BASE_PATH
* )
*
* @SWG\SecurityScheme(
* securityDefinition="JWTTokenAuth",
* type="apiKey",
* in="header",
* name="Authorization",
* description=API_DEFAULT_TOKEN,
* )
*/
After:
/**
* @SWG\Info(
* title="API",
* version="1.0"
* )
*
* @SWG\Swagger(
* host=API_HOST,
* basePath=API_BASE_PATH
* )
*
* @SWG\SecurityScheme(
* securityDefinition="JWTTokenAuth",
* type="apiKey",
* in="header",
* name="Authorization",
* description=API_DEFAULT_TOKEN,
* )
*/
统计信息
- 总下载量: 16.26k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-05-25