From 6d0d250075cd6bf4f09d5c6d81c0d4a7dd6e797f Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 14 Jun 2021 23:55:00 +0200 Subject: [PATCH] include phpstan --- README.md | 9 ++++++++- phpstan.neon | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 phpstan.neon diff --git a/README.md b/README.md index 9102b66a..e7a66cf0 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,11 @@ Documentation for Bludit v4 ------- There is a new branch for the Documentation in english for Bludit v4. -https://github.com/bludit/documentation-english/tree/v4.0 \ No newline at end of file +https://github.com/bludit/documentation-english/tree/v4.0 + +PHPStan +------- +https://phpstan.org/ +``` +docker run --rm -v $(pwd):/app ghcr.io/phpstan/phpstan:0.12.89 analyse -c /app/phpstan.neon /app +``` \ No newline at end of file diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 00000000..906df022 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,14 @@ +parameters: + phpVersion: 70100 # PHP 7.1 - https://github.com/phpstan/phpstan/blob/master/playground-api/handler.ts#L38 + #phpVersion: 70200 # PHP 7.2 + #phpVersion: 70300 # PHP 7.3 + #phpVersion: 70400 # PHP 7.4 + #phpVersion: 80000 # PHP 8.0 + level: 0 + excludePaths: + analyse: + - bl-kernel/helpers/simple-image.class.php + ignoreErrors: + - + message: '#Array has 2 duplicate keys with value#' + path: bl-kernel/helpers/text.class.php