diff --git a/Jenkinsfile b/Jenkinsfile index 5d21bd9..17f62e1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,7 +40,7 @@ pipeline { stage('Code Cleanliness') { agent any steps { - sh "php ./vendor/bin/phpstan analyse -c phpstan.neon -n --no-progress --no-ansi --error-format=checkstyle > ./build/logs/phpstan.log" + sh 'php composer.phar run-script ci:phpstan' recordIssues( failOnError: false, tools: [phpStan(reportEncoding: 'UTF-8', pattern: 'build/logs/phpstan.log')] diff --git a/composer.json b/composer.json index 0a7fba4..706059a 100644 --- a/composer.json +++ b/composer.json @@ -62,6 +62,7 @@ "scripts": { "test": "vendor/bin/phpunit -c build --no-coverage", "coverage": "phpdbg -qrr -- vendor/bin/phpunit -c build", - "phpstan": "vendor/bin/phpstan analyse src tests" + "phpstan": "vendor/bin/phpstan analyse src tests", + "ci:phpstan": "vendor/bin/phpstan analyse -c phpstan.neon -n --no-progress --no-ansi --error-format=checkstyle > ./build/logs/phpstan.log" } }