Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Commit

Permalink
composer: added PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Mar 10, 2020
1 parent bd36ac2 commit cbd27bd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@
"dg/adminer-custom": "^1.8"
},
"require-dev": {
"nette/tester": "^2.0"
"nette/tester": "^2.0",
"phpstan/phpstan-nette": "^0.12"
},
"autoload": {
"classmap": ["app/Bootstrap.php"]
},
"minimum-stability": "dev"
"minimum-stability": "dev",
"scripts": {
"phpstan": "phpstan analyse --level 5 --configuration phpstan.neon app bin www"
}
}
10 changes: 10 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
includes:
- vendor/phpstan/phpstan-nette/extension.neon

parameters:
autoload_directories:
- app

excludes_analyse:
- www/adminer
- www/checker
9 changes: 9 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,12 @@ Adminer

[Adminer](https://www.adminer.org/) is full-featured database management tool written in PHP and it is part of this Sandbox.
To use it, browse to the subdirectory `/adminer` in your project root (i.e. `http://localhost:8000/adminer`).


PHPStan
-------

[PHPStan](https://github.com/phpstan/phpstan) is static analysis tool to discover bugs in your code without running it.
Run PHPStan like this:

composer phpstan

0 comments on commit cbd27bd

Please sign in to comment.