mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Implement PHPStan (https://github.com/phpstan/phpstan)
This commit is contained in:
@@ -9,6 +9,7 @@ Common and useful classes, methods, exceptions etc.
|
||||
3. Implement Mutation Testing Framework (infection/infection package)
|
||||
4. Travis CI > run many tasks using Phing (instead of PHPUnit only)
|
||||
5. Fix integration with [Coveralls](https://www.coveralls.io) (available as the badge in [README.md](README.md))
|
||||
6. Implement [PHPStan](https://github.com/phpstan/phpstan)
|
||||
|
||||
# 1.0.1
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
"friendsofphp/php-cs-fixer": "^2.14",
|
||||
"infection/infection": "^0.11.4",
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpstan/phpstan": "^0.11.1",
|
||||
"phpunit/phpunit": "^8.0",
|
||||
"sebastian/phpcpd": "^4.1",
|
||||
"squizlabs/php_codesniffer": " ^2.9"
|
||||
|
||||
@@ -63,6 +63,15 @@ dir.docker = ${project.basedir}/docker
|
||||
dir.docker.data = ${dir.docker}/data/db
|
||||
dir.docker.logs = ${dir.docker}/logs/nginx
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# Static Analysis
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
# Paths of frameworks used to run analysis:
|
||||
# - PHPStan
|
||||
#
|
||||
check.phpstan.command = ./vendor/bin/phpstan analyse
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# Testing
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
<!-- Check target -->
|
||||
<target name="build:check"
|
||||
depends="check:cs,
|
||||
check:cpd"
|
||||
check:cpd,
|
||||
check:phpstan"
|
||||
/>
|
||||
|
||||
<!-- Test target -->
|
||||
@@ -69,6 +70,11 @@
|
||||
</phpcpd>
|
||||
</target>
|
||||
|
||||
<!-- Run static analysis -->
|
||||
<target name="check:phpstan" depends="build:prepare">
|
||||
<exec command="${check.phpstan.command}" passthru="true"/>
|
||||
</target>
|
||||
|
||||
<!-- PHPUnit tests -->
|
||||
<target name="test:phpunit" depends="build:prepare">
|
||||
<exec command="${tests.phpunit.command}" passthru="true"/>
|
||||
|
||||
5
phpstan.neon.dist
Normal file
5
phpstan.neon.dist
Normal file
@@ -0,0 +1,5 @@
|
||||
parameters:
|
||||
level: 1
|
||||
paths:
|
||||
- src
|
||||
- tests
|
||||
Reference in New Issue
Block a user