swaggest/php-code-builder

View on GitHub
Makefile

Summary

Maintainability
Test Coverage
PHPSTAN_VERSION ?= 0.11.15

deps:
    @git submodule init && git submodule update

lint:
    @test -f ${HOME}/.cache/composer/phpstan-${PHPSTAN_VERSION}.phar || (mkdir -p ${HOME}/.cache/composer/ && wget https://github.com/phpstan/phpstan/releases/download/${PHPSTAN_VERSION}/phpstan.phar -O ${HOME}/.cache/composer/phpstan-${PHPSTAN_VERSION}.phar)
    @php $$HOME/.cache/composer/phpstan-${PHPSTAN_VERSION}.phar analyze -l 7 -c phpstan.neon ./src

docker-lint:
    @docker run -v $$PWD:/app --rm phpstan/phpstan:${PHPSTAN_VERSION} analyze -l 7 -c phpstan.neon ./src

test:
    @php -derror_reporting="E_ALL & ~E_DEPRECATED" vendor/bin/phpunit

test-coverage:
    @php -derror_reporting="E_ALL & ~E_DEPRECATED" -dzend_extension=xdebug.so -dxdebug.mode=coverage vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml

gen:
    @php ./tools/generate_swagger_structures.php
    @php ./tools/generate_status_codes.php