From 28b5b0cab5eeaecaa4cb2b4f765c1d0d354550e4 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Tue, 12 Nov 2024 09:42:11 +0100 Subject: Add PHPStan as a developer dependency. PHPStan is a static PHP code analyzer that's aimed at finding actual bugs in the code. Where PHP Code Sniffer is about codeing standards, PHPStan is about correctness of code. The provided configuration file (`phpstan.neon.dist`) is configured to use the _lowest_ level of checks that PHPStan will report on. See https://phpstan.org/user-guide/rule-levels for information about the various rule levels. Run an analysis of the code base like this: % ./vendor/bin/phpstan It will output any found issues to stdout. You can also run it like this: % ./vendor/bin/phpstan --error-format=raw > phpstan.log This will give you an output file in a format that's suitable for use with typical editors for mapping errors to source locations. --- phpstan.neon.dist | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 phpstan.neon.dist (limited to 'phpstan.neon.dist') diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 000000000..642102ffb --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,9 @@ +parameters: + level: 0 + paths: + - boot.php + - include + - util + - Zotlabs + scanDirectories: + - library -- cgit v1.2.3