mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 17:41:50 +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)
|
3. Implement Mutation Testing Framework (infection/infection package)
|
||||||
4. Travis CI > run many tasks using Phing (instead of PHPUnit only)
|
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))
|
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
|
# 1.0.1
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
"friendsofphp/php-cs-fixer": "^2.14",
|
"friendsofphp/php-cs-fixer": "^2.14",
|
||||||
"infection/infection": "^0.11.4",
|
"infection/infection": "^0.11.4",
|
||||||
"php-coveralls/php-coveralls": "^2.1",
|
"php-coveralls/php-coveralls": "^2.1",
|
||||||
|
"phpstan/phpstan": "^0.11.1",
|
||||||
"phpunit/phpunit": "^8.0",
|
"phpunit/phpunit": "^8.0",
|
||||||
"sebastian/phpcpd": "^4.1",
|
"sebastian/phpcpd": "^4.1",
|
||||||
"squizlabs/php_codesniffer": " ^2.9"
|
"squizlabs/php_codesniffer": " ^2.9"
|
||||||
|
|||||||
@@ -63,6 +63,15 @@ dir.docker = ${project.basedir}/docker
|
|||||||
dir.docker.data = ${dir.docker}/data/db
|
dir.docker.data = ${dir.docker}/data/db
|
||||||
dir.docker.logs = ${dir.docker}/logs/nginx
|
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
|
# Testing
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
<!-- Check target -->
|
<!-- Check target -->
|
||||||
<target name="build:check"
|
<target name="build:check"
|
||||||
depends="check:cs,
|
depends="check:cs,
|
||||||
check:cpd"
|
check:cpd,
|
||||||
|
check:phpstan"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Test target -->
|
<!-- Test target -->
|
||||||
@@ -69,6 +70,11 @@
|
|||||||
</phpcpd>
|
</phpcpd>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<!-- Run static analysis -->
|
||||||
|
<target name="check:phpstan" depends="build:prepare">
|
||||||
|
<exec command="${check.phpstan.command}" passthru="true"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
<!-- PHPUnit tests -->
|
<!-- PHPUnit tests -->
|
||||||
<target name="test:phpunit" depends="build:prepare">
|
<target name="test:phpunit" depends="build:prepare">
|
||||||
<exec command="${tests.phpunit.command}" passthru="true"/>
|
<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