1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
Go to file
2016-12-28 14:38:16 -05:00
bin Fix start time ref 2016-12-14 19:43:20 -05:00
examples Hide Mixed* issues under a totallyTyped config flag 2016-12-18 19:17:39 -05:00
src/Psalm Fix leaking ref in SwitchChecker 2016-12-28 14:38:16 -05:00
tests Fix #13 by revamping how we treat type assertions in if statements and ternary expressions 2016-12-28 13:12:06 -05:00
.gitignore Fixing a typo in the .gitignore filename. 2016-10-20 11:52:14 -04:00
.travis.yml Add self-check to travis build 2016-12-23 19:47:35 +00:00
composer.json Add phpcs as a dev dep cc @erunion 2016-12-23 23:50:57 +00:00
composer.lock Add phpcs as a dev dep cc @erunion 2016-12-23 23:50:57 +00:00
LICENSE Add license 2016-11-21 14:48:17 -05:00
phpcs.xml PSR-2 2016-11-02 17:50:54 -04:00
phpunit.xml Update PHPUnit to version without count bug 2016-12-23 21:50:31 +00:00
psalm.xml Fix mixed operand issues 2016-12-24 18:29:11 +00:00
PsalmLogo.png Update border 2016-10-29 12:46:34 -04:00
README.md Change image link 2016-12-12 15:32:01 -05:00

logo

Psalm is a static analysis tool for finding errors in PHP applications.

  • v0.3.x supports checking PHP 5.4 - 7.1 code, and requires PHP 5.5+ to run.
  • v0.2.x supports checking PHP 5.4 - 7.0 code and requires PHP 5.4+ to run.

Check out the wiki or try a live demo!

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.