Skip to content

Commit

Permalink
Satisfy phpstan and add it as a new precommit-hook
Browse files Browse the repository at this point in the history
  • Loading branch information
stmh committed Jul 7, 2019
1 parent 1f2292c commit 8e747dc
Show file tree
Hide file tree
Showing 33 changed files with 1,227 additions and 221 deletions.
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,17 @@
files: \.php$
args:
- --standard=PSR2 -p

- repo: local
hooks:
- id: phpstan
name: "PHPStan"
language: script
files: ^src/(.*)\.php$
entry: ./vendor/bin/phpstan analyze --no-progress --error-format raw --level 4

- repo: https://github.com/digitalpulp/pre-commit-php.git
sha: 1.3.0
hooks:
- id: php-unit
files: \.php$
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
},
"require-dev": {
"symfony/phpunit-bridge": "^2.8|^3|^4.1",
"phpunit/phpunit": "^7.3"
"phpunit/phpunit": "^7.3",
"phpstan/phpstan": "^0.11.9",
"phpstan/phpstan-symfony": "^0.11.6"
},
"autoload": {
"psr-4": {"Phabalicious\\": "src/"}
Expand Down
Loading

0 comments on commit 8e747dc

Please sign in to comment.