diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 0f9edd2..136ce36 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -48,3 +48,6 @@ jobs: - name: Execute PHPStan run: vendor/bin/phpstan analyse -c phpstan.neon + + - name: Execute Psalm + run: vendor/bin/psalm diff --git a/composer.json b/composer.json index 3d5200a..5cee8de 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ "require-dev": { "phpunit/phpunit": "^7.5.15|^8.5|^9.0", "phpstan/phpstan": "^1.9", - "phpstan/phpstan-strict-rules": "^1.6" + "phpstan/phpstan-strict-rules": "^1.6", + "vimeo/psalm": "^5.26" }, "autoload": { "psr-4": { diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 0000000..8822f66 --- /dev/null +++ b/psalm.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/tests/tools/analyse.sh b/tests/tools/analyse.sh index 19318aa..a90ee7d 100755 --- a/tests/tools/analyse.sh +++ b/tests/tools/analyse.sh @@ -3,18 +3,20 @@ source tests/tools/helpers.sh function main { - get_phpstan_path + get_paths banner $PHPSTAN analyse -c phpstan.neon + $PSALM } -function get_phpstan_path() +function get_paths() { current_directory PHPSTAN="$ROOT_DIRECTORY/vendor/bin/phpstan" + PSALM="$ROOT_DIRECTORY/vendor/bin/psalm" } function banner @@ -22,7 +24,9 @@ function banner echo Google2FA testing framework echo ----------------------------- echo - echo You can execute these tests by running $PHPSTAN + echo You can execute these tests by running + echo - $PHPSTAN + echo - $PSALM echo }