Skip to content

Commit

Permalink
Merge pull request #1146 from Koen1999/phpstan
Browse files Browse the repository at this point in the history
Added a PhpStan shortcut to evaluate PR changes & moved PhpStan files
  • Loading branch information
tomudding authored Jul 30, 2021
2 parents 617ec6d + 29421d2 commit 239d5c2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ config/bash.env
.idea/sonarlint.xml

.idea/sonarlint-state.xml

phpstan/phpstan-baseline-pr.neon
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ copyconf:
phpstan:
@docker-compose exec web vendor/bin/phpstan analyse -c phpstan.neon

phpstanpr:
@git checkout --detach master
@make rundev
@docker-compose exec web vendor/bin/phpstan analyse -c phpstan.neon --generate-baseline phpstan/phpstan-baseline-pr.neon
@git checkout -
@docker cp gewisweb_web_1:/code/phpstan/phpstan-baseline-pr.neon ./phpstan/phpstan-baseline-pr.neon
@make rundev
@docker cp ./phpstan/phpstan-baseline-pr.neon gewisweb_web_1:/code/phpstan/phpstan-baseline.neon
@docker-compose exec web vendor/bin/phpstan analyse -c phpstan.neon

phpcs:
@vendor/bin/phpcs -p --standard=PSR1,PSR12 --extensions=php,dist module config

Expand Down
6 changes: 3 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
includes:
- phpstan-baseline.neon
- phpstan/phpstan-baseline.neon

parameters:
level: 3
bootstrapFiles:
- bootstrap.php
laminasframework:
serviceManagerLoader: phpstan-sm.php
serviceManagerLoader: phpstan/phpstan-sm.php
doctrine:
objectManagerLoader: phpstan-om.php
objectManagerLoader: phpstan/phpstan-om.php
paths:
- config
- bootstrap.php
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 239d5c2

Please sign in to comment.