Toolset which usually required to develop php and check code you write. Contains:
- phpstan
- phpmd
- phpcs
- phpcpd
- phpmnd
Make sure your env has app called xq
, install it via package manager
composer require --dev achertovsky/phptools
vendor/bin/suggest-config
vendor/bin/phptools
phpstan launched with --memory_limit=-1
flag due to widely-known issues so to not it leat all memory of your machine use -m
param of docker to limit container memory
-m
will check files that is modified/added according togit
-p test.php
will check provided file only
phar placed in lib code is box'ed from latest phpcpd main branch code and do not belong to lib author
You can create your own
https://phpmd.org/documentation/creating-a-ruleset.html
https://phpstan.org/config-reference#config-file
check phpcpd.xml
file in config
directory
check phpmnd.xml
file in config
directory
https://github.com/achertovsky/phpdrc/blob/master/readme.md#config
docker build -t phptools .
docker run --rm -it -u${UID} -v${PWD}:/var/www/html -w/var/www/html phptools composer i
cp config/* .
docker run --rm -it -u${UID} -v${PWD}:/var/www/html -w/var/www/html phptools php phptools