Skip to content

Commit

Permalink
Merge pull request #2 from shochdoerfer/feature/phpstan
Browse files Browse the repository at this point in the history
Add PHPStan Composer dependency
  • Loading branch information
shochdoerfer committed Apr 20, 2019
2 parents d1d74e8 + 7c1b49b commit 14e2b19
Show file tree
Hide file tree
Showing 5 changed files with 1,009 additions and 62 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -22,7 +22,9 @@ jobs:
script:
- composer validate
- ./vendor/bin/phing security:check
- ./vendor/bin/phing lint
- ./vendor/bin/phing sniff
- ./vendor/bin/phing analyze
- stage: coverage
if: branch=master AND type=push
php: 7.2
Expand Down
26 changes: 16 additions & 10 deletions build.xml
Expand Up @@ -12,20 +12,26 @@
</exec>
</target>

<target name="lint">
<exec executable="php"
<target name="analyze">
<exec executable="./vendor/bin/phpstan"
passthru="true"
checkreturn="true">
<arg value="-l"/>
<arg path="${phing.dir}/src"/>
<arg value="analyze"/>
</exec>
</target>

<exec executable="php"
passthru="true"
checkreturn="true">
<arg value="-l"/>
<arg path="${phing.dir}/tests"/>
</exec>
<target name="lint">
<phplint>
<fileset dir="${phing.dir}/src">
<include name="**/*.php"/>
</fileset>
</phplint>

<phplint>
<fileset dir="${phing.dir}/tests">
<include name="**/*.php"/>
</fileset>
</phplint>
</target>

<target name="unit">
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -19,7 +19,8 @@
"phpunit/phpunit": "^8.0",
"squizlabs/php_codesniffer": "^2.9.0",
"bitexpert/phing-securitychecker": "^0.4.0",
"phing/phing": "^2.16.0"
"phing/phing": "^2.16.0",
"phpstan/phpstan": "^0.11.5"
},
"autoload" : {
"psr-4" : {
Expand Down

0 comments on commit 14e2b19

Please sign in to comment.