.PHONY: test autoload fmt psalm phpstan sloc cov

test:
	# try system wide installations of PHPUnit first
	/usr/bin/phpunit || /usr/bin/phpunit9 || phpunit

cov:
	/usr/bin/phpunit --coverage-html cov || /usr/bin/phpunit9 --coverage-html cov || phpunit --coverage-html cov

autoload:
	phpab -o example/autoload.php src

fmt:
	php-cs-fixer fix

psalm:
	psalm

phpstan:
	phpstan

sloc:
	tokei src || cloc src
