-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 1000 Bytes
/
Makefile
File metadata and controls
34 lines (26 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
PHP_CS_RULES=@Symfony,-global_namespace_import
.PHONY: test
test: check-style check-rules phpunit
.PHONY: phpunit
phpunit:
@echo "-- Running phpunit... See output/coverage/index.html "
XDEBUG_MODE=coverage vendor/bin/phpunit -c phpunit.xml.dist \
--log-junit output/junit-report.xml \
--coverage-clover output/clover.xml \
--coverage-html output/coverage
.PHONY: check-rules
check-rules: phpstan
phpstan:
vendor/bin/phpstan analyse -c phpstan.neon --error-format=raw
.PHONY: fix-style
fix-style: vendor
@echo "-- Fixing coding style using php-cs-fixer..."
vendor/bin/php-cs-fixer fix src --rules $(PHP_CS_RULES)
vendor/bin/php-cs-fixer fix tests --rules $(PHP_CS_RULES)
.PHONY: check-style
check-style: vendor
@echo "-- Checking coding style using php-cs-fixer (run 'make fix-style' if it fails)"
vendor/bin/php-cs-fixer fix src --rules $(PHP_CS_RULES) -v --dry-run --diff
vendor/bin/php-cs-fixer fix tests --rules $(PHP_CS_RULES) -v --dry-run --diff
vendor:
composer install