<commit_before>PHPLINT=./bin/phplint.sh
PHPUNIT=./vendor/bin/phpunit
PHPMETRICS=./vendor/bin/phpmetrics
PHAN=./vendor/bin/phan
TEST_REPORTS_DIR=./tests/_resources/reports

composer:
	composer validate
	composer install --prefer-source --no-interaction --dev
.PHONY: composer

phplint:
	$(PHPLINT) src/ tests/
.PHONY: phplint

phpcs-check:
	php-cs-fixer fix --dry-run --diff
.PHONY: phpcs-check

phpcs-fix:
	php-cs-fixer fix
.PHONY: phpcs-fix

phan:
	$(PHAN)
.PHONY: phplint

phpunit-no-report:
	$(PHPUNIT)
.PHONY: phpunit-no-report

phpunit:
	$(PHPUNIT) --log-junit $(TEST_REPORTS_DIR)/phpunit-report.xml
.PHONY: phpunit

phpunit-coverage:
	$(PHPUNIT) \
	--coverage-html $(TEST_REPORTS_DIR)/coverage-html \
	--coverage-clover $(TEST_REPORTS_DIR)/clover.xml \
	--log-junit $(TEST_REPORTS_DIR)/phpunit-report.xml
.PHONY: phpunit-coverage

metrics: phpunit
	$(PHPMETRICS) \
	--report-html=$(TEST_REPORTS_DIR)/metrics \
	--junit=$(TEST_REPORTS_DIR)/phpunit-report.xml \
	--extenstions=php \
	./src
.PHONY: metrics

check: phplint phpcs-check phpunit phan
<commit_msg>Add phan<commit_after>PHPLINT=./bin/phplint.sh
PHPUNIT=./vendor/bin/phpunit
PHPMETRICS=./vendor/bin/phpmetrics
PHAN=./vendor/bin/phan
TEST_REPORTS_DIR=./tests/_resources/reports

composer:
	composer validate
	composer install --prefer-source --no-interaction --dev
.PHONY: composer

phplint:
	$(PHPLINT) src/ tests/
.PHONY: phplint

phpcs-check:
	php-cs-fixer fix --dry-run --diff
.PHONY: phpcs-check

phpcs-fix:
	php-cs-fixer fix
.PHONY: phpcs-fix

phan:
	$(PHAN)
.PHONY: phan

phpunit-no-report:
	$(PHPUNIT)
.PHONY: phpunit-no-report

phpunit:
	$(PHPUNIT) --log-junit $(TEST_REPORTS_DIR)/phpunit-report.xml
.PHONY: phpunit

phpunit-coverage:
	$(PHPUNIT) \
	--coverage-html $(TEST_REPORTS_DIR)/coverage-html \
	--coverage-clover $(TEST_REPORTS_DIR)/clover.xml \
	--log-junit $(TEST_REPORTS_DIR)/phpunit-report.xml
.PHONY: phpunit-coverage

metrics: phpunit
	$(PHPMETRICS) \
	--report-html=$(TEST_REPORTS_DIR)/metrics \
	--junit=$(TEST_REPORTS_DIR)/phpunit-report.xml \
	--extenstions=php \
	./src
.PHONY: metrics

check: phplint phpcs-check phpunit phan

{'fraction_non_alphanumeric': 0.15769593956562794, 'fraction_numerical': 0.0, 'mean_word_length': 4.118357487922705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3324373', 'n_tokens_mistral': 922, 'n_tokens_neox': 915, 'n_words': 143}