all: cs-fix tests coverage

# Actually Fix CS
cs-fix:
	bin/php-cs-fixer fix src/

# Run Tests
tests: test-cs-fix phpstan phpunit

test-cs-fix:
	bin/php-cs-fixer fix --using-cache=false --dry-run --stop-on-violation 
phpstan:
	bin/phpstan analyse src/ --level=7
phpunit:
	bin/phpunit tests/ --stop-on-error
coverage:
	rm -rf docs/coverage/
	docker run -v $(shell pwd):/app --user='1000' --rm phpunit/phpunit:6.0.6 tests/ --coverage-html docs/coverage/