timmit / php-docblock-checker
A simple tool for checking that your PHP classes and methods use docblocks.
Installs: 3 981
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 38
Open Issues: 0
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-10-30 01:32:05 UTC
README
Check PHP files within a directory for appropriate use of Docblocks.
Installation
Composer:
composer require timmit/php-docblock-checker
Usage
CMD:
call vendor/bin/phpdoccheck {params}
To validate changed files in the last git commit:
git diff --name-only HEAD HEAD^ | ./vendor/bin/phpdoccheck --from-stdin
If used within a travis context, this may be useful:
git diff --name-only ${TRAVIS_COMMIT_RANGE:-"HEAD^"} | ./vendor/bin/phpdoccheck --from-stdin
Parameters
Parameters may be passed either from the command line, or via a config file (defaults to phpdoccheck.yml
in the currrent working directory).
The config file location may be overriden by specifying the --config-file
option
If a parameter is specified in both places, the command line will take priority.
Each option is also available in the 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