mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
bin | ||
examples | ||
src/Psalm | ||
tests | ||
.gitignore | ||
composer.json | ||
composer.lock | ||
LICENSE | ||
phpcs.xml | ||
psalm.xml | ||
PsalmLogo.png | ||
README.md |
Psalm is a static analysis tool for finding errors in PHP applications.
Version 0.3.x supports checking PHP 5.4 - 7.1 code, and requires PHP 5.5 and higher to run.
Version 0.2.x supports checking PHP 5.4 - 7.0 code and requires PHP 5.4 and higher to run.
Check out the wiki!
Quickstart Guide
Install via Composer:
composer require --dev "vimeo/psalm:dev-master"
composer install
Add a psalm.xml
config:
cat > psalm.xml << EOF
<?xml version="1.0"?>
<psalm
stopOnFirstError="false"
useDocblockTypes="true"
>
<inspectFiles>
<directory name="src" />
</inspectFiles>
</psalm>
EOF
Then run Psalm with:
./vendor/bin/psalm
The above config is spartan, and will show you all possible errors, including many that are likely irrelevant to you. A more lenient config is provided here.