@@ -13,12 +13,20 @@ help:
1313# ---------------------------------------------------------------------------
1414
1515.PHONY : clean
16- clean : # # Clean all created artifacts
16+ clean : # # Clean all created artifacts
1717clean :
1818 git clean --exclude=.idea/ -ffdx
1919
20+ .PHONY : cs
21+ CODE_SNIFFER =vendor-bin/code-sniffer/vendor/bin/phpcs
22+ CODE_SNIFFER_FIX =vendor-bin/code-sniffer/vendor/bin/phpcbf
23+ cs : # # Fixes CS
24+ cs : $(CODE_SNIFFER ) $(CODE_SNIFFER_FIX )
25+ $(PHPNOGC ) $(CODE_SNIFFER_FIX ) || true
26+ $(PHPNOGC ) $(PHP_CS_FIXER ) fix
27+
2028.PHONY : build
21- build : # # Build the PHAR
29+ build : # # Build the PHAR
2230BOX =bin/box
2331build : bin/php-scoper.phar
2432
@@ -28,26 +36,26 @@ build: bin/php-scoper.phar
2836# ---------------------------------------------------------------------------
2937
3038.PHONY : test
31- test : # # Run all the tests
39+ test : # # Run all the tests
3240test : tc e2e
3341
3442.PHONY : tu
3543PHPUNIT =bin/phpunit
36- tu : # # Run PHPUnit tests
44+ tu : # # Run PHPUnit tests
3745tu : bin/phpunit
3846 $(PHPBIN ) $(PHPUNIT )
3947
4048.PHONY : tc
41- tc : # # Run PHPUnit tests with test coverage
49+ tc : # # Run PHPUnit tests with test coverage
4250tc : bin/phpunit vendor-bin/covers-validator/vendor clover.xml
4351
4452.PHONY : tm
45- tm : # # Run Infection (Mutation Testing)
53+ tm : # # Run Infection (Mutation Testing)
4654tm : bin/phpunit
4755 $(MAKE ) e2e_020
4856
4957.PHONY : e2e
50- e2e : # # Run end-to-end tests
58+ e2e : # # Run end-to-end tests
5159e2e : e2e_004 e2e_005 e2e_011 e2e_013 e2e_014 e2e_015 e2e_016 e2e_017 e2e_018 e2e_019 e2e_020 e2e_021 e2e_022 e2e_023 e2e_024 e2e_025 e2e_026 e2e_027
5260
5361PHPSCOPER =bin/php-scoper.phar
@@ -287,7 +295,7 @@ e2e_027: bin/php-scoper.phar fixtures/set027-laravel/vendor
287295
288296.PHONY : tb
289297BLACKFIRE =blackfire
290- tb : # # Run Blackfire profiling
298+ tb : # # Run Blackfire profiling
291299tb : bin/php-scoper.phar vendor
292300 $(BLACKFIRE ) --new-reference run $(PHPBIN ) bin/php-scoper.phar add-prefix --output-dir=build/php-scoper --force --quiet
293301
@@ -314,6 +322,10 @@ vendor-bin/covers-validator/vendor: vendor-bin/covers-validator/composer.lock ve
314322 composer bin covers-validator install
315323 touch $@
316324
325+ vendor-bin/code-sniffer/vendor : vendor-bin/code-sniffer/composer.lock vendor/bamarni
326+ composer bin code-sniffer install
327+ touch $@
328+
317329fixtures/set005/vendor : fixtures/set005/composer.lock
318330 composer --working-dir=fixtures/set005 install
319331 touch $@
@@ -429,3 +441,11 @@ clover.xml: src
429441 --coverage-clover=clover.xml \
430442 --coverage-xml=dist/infection-coverage/coverage-xml \
431443 --log-junit=dist/infection-coverage/phpunit.junit.xml
444+
445+ $(CODE_SNIFFER ) : vendor-bin/code-sniffer/vendor
446+ composer bin code-sniffer install
447+ touch $@
448+
449+ $(CODE_SNIFFER_FIX ) : vendor-bin/code-sniffer/vendor
450+ composer bin code-sniffer install
451+ touch $@
0 commit comments