build(yarn): Add grunt-phpstan

This commit is contained in:
Pierre Rudloff 2019-03-31 17:18:57 +02:00
parent ac3b768b50
commit 06f665bdad
5 changed files with 984 additions and 3 deletions

View file

@ -33,6 +33,18 @@ module.exports = function (grunt) {
src: ['tests/*.php']
}
},
phpstan: {
options: {
level: 'max',
bin: 'vendor/bin/phpstan'
},
php: {
src: ['*.php', 'classes/*.php', 'controllers/*.php']
},
tests: {
src: ['tests/*.php']
}
},
jslint: {
js: {
src: ['js/*.js']
@ -125,9 +137,10 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-potomo');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-markdownlint');
grunt.loadNpmTasks('grunt-phpstan');
grunt.registerTask('default', ['cssmin', 'potomo']);
grunt.registerTask('lint', ['csslint', 'fixpack', 'jsonlint', 'markdownlint', 'phpcs']);
grunt.registerTask('lint', ['csslint', 'fixpack', 'jsonlint', 'markdownlint', 'phpcs', 'phpstan']);
grunt.registerTask('test', ['phpunit']);
grunt.registerTask('doc', ['phpdocumentor']);
grunt.registerTask('release', ['default', 'githash', 'compress']);