Skip to content

Commit

Permalink
chore(composer): install phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudgirard committed Mar 5, 2024
1 parent a55e503 commit 65e40aa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,12 @@ cs-fix: composer-install
cs-ci: composer-install
$(call printSection,PHPCS)
${BIN_DIR}/php-cs-fixer fix --dry-run --using-cache=no --verbose

.PHONY: phpstan-cache-clear
phpstan-cache-clear:
${BIN_DIR}/phpstan.phar clear-result-cache

.PHONY: phpstan
phpstan: phpstan-cache-clear
$(call printSection,PHPSTAN)
${BIN_DIR}/phpstan.phar analyse --memory-limit=1G
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
},
"require-dev" : {
"atoum/atoum": "~4.0",
"m6web/php-cs-fixer-config": "^3.2"
"m6web/php-cs-fixer-config": "^3.2",
"phpstan/phpstan": "^1.10"
},
"suggest": {
"ocramius/proxy-manager": "Required for lazy connections"
Expand Down
10 changes: 10 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
parameters:
paths:
- 'src'
excludePaths:
- 'src/AmqpBundle/Tests'

level: 8
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
treatPhpDocTypesAsCertain: false

0 comments on commit 65e40aa

Please sign in to comment.