Skip to content

Commit

Permalink
Added psalm and php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
cjonstrup committed Jan 10, 2021
1 parent eeb0529 commit 63343b6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"php-coveralls/php-coveralls": "dev-master",
"phpstan/phpstan": "0.12.x-dev",
"phpunit/phpunit": "^8.0|^9.0",
"squizlabs/php_codesniffer": "3.*"
"friendsofphp/php-cs-fixer": "^2.16",
"vimeo/psalm": "^4.00"

},
"config": {
"sort-packages": true
Expand All @@ -34,6 +36,8 @@
}
},
"scripts": {
"psalm": "vendor/bin/psalm --show-info=true",
"fix": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
"test": [
"XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover build/logs/clover.xml --coverage-html build/logs/phpunit-html/"
],
Expand Down
21 changes: 21 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<psalm
errorLevel="4"
findUnusedVariablesAndParams="true"
resolveFromConfigFile="true"
useDocblockPropertyTypes="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="src"/>
</projectFiles>

<issueHandlers>
<NoInterfaceProperties errorLevel="suppress"/>
</issueHandlers>

<plugins>
</plugins>
</psalm>

0 comments on commit 63343b6

Please sign in to comment.