diff --git a/.gitignore b/.gitignore index 2ceca2b..d497d9b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ !/.gitignore !/composer.json !/Makefile +!/psalm.xml !/src/** !/tests/** diff --git a/Makefile b/Makefile index 4dcba86..50de742 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ .PHONY: * +static-code-analysis: + php vendor/bin/psalm --show-info=true + phpcs: php vendor/bin/phpcs --standard=PSR2 src tests diff --git a/composer.json b/composer.json index a680aa9..c4227cb 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,8 @@ "require-dev": { "phpunit/phpunit": "^9.1", "squizlabs/php_codesniffer": "^3.5", - "symfony/var-dumper": "^5.0" + "symfony/var-dumper": "^5.0", + "vimeo/psalm": "^3.11" }, "config": { "sort-packages": true diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 0000000..a26ebb6 --- /dev/null +++ b/psalm.xml @@ -0,0 +1,17 @@ + + + + + + + + +