diff --git a/Makefile b/Makefile index bad1dc419d..5f76478944 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,18 @@ -vendor/autoload.php: - composer install --no-interaction --prefer-dist +.PHONY: build fix help sniff test + +help: + @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +build: fix test ## Runs fix and test targets -.PHONY: fix -fix: vendor/autoload.php +fix: vendor/autoload.php ## Fixes code style issues with phpcbf vendor/bin/phpcbf --standard=PSR2 src -.PHONY: sniff -sniff: vendor/autoload.php +sniff: vendor/autoload.php ## Detects code style issues with phpcs vendor/bin/phpcs --standard=PSR2 src -n -.PHONY: test -test: vendor/autoload.php +test: vendor/autoload.php ## Runs tests with phpunit vendor/bin/phpunit --verbose + +vendor/autoload.php: + composer install --no-interaction --prefer-dist