default: help

help:
	@echo "  make lint                  - Синтаксическая проверка (php -l) всех .php-файлов"
	@echo "  make phpstan               - Запустить PHPStan (tools/phpstan)"
	@echo "  make phpstan-baseline-update - Пересобрать phpstan-baseline.neon"
	@echo "  make phpstan-install       - Установить PHPStan в tools/phpstan/vendor"
	@echo "  make phpstan-update        - Обновить PHPStan в tools/phpstan/vendor"
	@echo "  make test                  - lint + phpstan"

lint:
	find . -path ./vendor -prune -o -path ./tools -prune -o -name '*.php' -print | xargs -n1 php -l

phpstan:
	composer phpstan

phpstan-baseline-update:
	composer phpstan-baseline-update

phpstan-install:
	composer phpstan-install

phpstan-update:
	composer phpstan-update

test: lint phpstan

.PHONY: default help lint phpstan phpstan-baseline-update phpstan-install phpstan-update test
