timmit / php-docblock-checker
一个简单的工具,用于检查您的PHP类和方法是否使用了docblocks。
1.11.11
2023-12-01 11:07 UTC
Requires
- php: >=8.0
- ext-json: *
- nikic/php-parser: 3.*|4.*
- symfony/console: >=5.0.0
- symfony/yaml: >=5.0.0
Requires (Dev)
- jakub-onderka/php-parallel-lint: 0.8.*
- phperf/xh-tool: ^1.1
- phpstan/phpstan: ^1.9.4
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-strict-rules: ^1.1
- squizlabs/php_codesniffer: ^3.4
- dev-master
- 1.11.11
- 1.11.10
- 1.11.9
- 1.11.8
- 1.11.7
- 1.11.6
- 1.11.5
- 1.11.4
- 1.11.3
- 1.11.2
- 1.11.1
- 1.11.0
- 1.10.11
- 1.10.10
- 1.10.9
- 1.10.8
- 1.10.7
- 1.10.6
- 1.10.5
- 1.10.4
- 1.10.3
- 1.10.2
- 1.10.1
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-fix-for-mixed
- dev-fix-for-param-and-return-type-with-parentheses
- dev-support-for-uniontype
- dev-fix-some-phpstan-warnings
- dev-new-php-requirements
- dev-verbose
- dev-ontdubbel-params
This package is auto-updated.
Last update: 2024-08-30 01:14:57 UTC
README
检查目录内PHP文件的Docblocks使用情况。
安装
Composer:
composer require timmit/php-docblock-checker
使用方法
CMD:
call vendor/bin/phpdoccheck {参数}
验证上一次git提交中更改的文件
git diff --name-only HEAD HEAD^ | ./vendor/bin/phpdoccheck --from-stdin
如果在使用travis环境中,这可能很有用: git diff --name-only ${TRAVIS_COMMIT_RANGE:-"HEAD^"} | ./vendor/bin/phpdoccheck --from-stdin
参数
参数可以从命令行或通过配置文件传递(默认为当前工作目录中的phpdoccheck.yml
)。
可以通过指定--config-file
选项来覆盖配置文件的位置
如果两个地方都指定了参数,则命令行将优先。
每个选项也在配置文件中可用
directory: src files-per-line: 10 cache-file: .phpdoccheck exclude: - foo/bar/baz.php - foo/* options: - skip-classes - skip-methods - skip-signatures - only-signatures - fail-on-warnings - info-only - from-stdin - json