Set up static code analysis using Psalm

This commit is contained in:
Bubka 2022-08-26 15:48:41 +02:00
parent 05e629d6f8
commit 808d5a0d10
2 changed files with 24 additions and 1 deletions

View File

@ -41,7 +41,9 @@
"fakerphp/faker": "^1.20",
"mockery/mockery": "^1.5",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^9.5",
"psalm/plugin-laravel": "1.6.2",
"vimeo/psalm": "^4.26"
},
"config": {
"optimize-autoloader": true,

21
psalm.xml Normal file
View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<psalm
errorLevel="7"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="app"/>
<directory name="database/factories"/>
<directory name="database/seeders"/>
<ignoreFiles>
<directory name="vendor"/>
<directory name="app/Protobuf"/>
</ignoreFiles>
</projectFiles>
<plugins>
<pluginClass class="Psalm\LaravelPlugin\Plugin"/>
</plugins>
</psalm>