This commit is contained in:
Meritoo
2019-04-03 19:47:08 +02:00
parent 92e607a3f0
commit da9ae20a33
3 changed files with 56 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ Common and useful classes, methods, exceptions etc.
5. Fix integration with [Coveralls](https://www.coveralls.io) (available as the badge in [README.md](README.md))
6. Implement [PHPStan](https://github.com/phpstan/phpstan)
7. PHPUnit > execute tests in random order
8. Implement [Psalm](https://github.com/vimeo/psalm)
# 1.0.1

View File

@@ -27,7 +27,8 @@
"phpstan/phpstan": "^0.11.1",
"phpunit/phpunit": "^8.0",
"sebastian/phpcpd": "^4.1",
"squizlabs/php_codesniffer": " ^2.9"
"squizlabs/php_codesniffer": " ^2.9",
"vimeo/psalm": "^3.0"
},
"autoload": {
"psr-4": {

53
psalm.xml Normal file
View File

@@ -0,0 +1,53 @@
<?xml version="1.0"?>
<psalm
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
totallyTyped="false"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config file:///project/vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<issueHandlers>
<LessSpecificReturnType errorLevel="info" />
<!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->
<DeprecatedMethod errorLevel="info" />
<DeprecatedProperty errorLevel="info" />
<DeprecatedClass errorLevel="info" />
<DeprecatedConstant errorLevel="info" />
<DeprecatedInterface errorLevel="info" />
<DeprecatedTrait errorLevel="info" />
<InternalMethod errorLevel="info" />
<InternalProperty errorLevel="info" />
<InternalClass errorLevel="info" />
<MissingClosureReturnType errorLevel="info" />
<MissingReturnType errorLevel="info" />
<MissingPropertyType errorLevel="info" />
<InvalidDocblock errorLevel="info" />
<MisplacedRequiredParam errorLevel="info" />
<PropertyNotSetInConstructor errorLevel="info" />
<MissingConstructor errorLevel="info" />
<MissingClosureParamType errorLevel="info" />
<MissingParamType errorLevel="info" />
<RedundantCondition errorLevel="info" />
<DocblockTypeContradiction errorLevel="info" />
<RedundantConditionGivenDocblockType errorLevel="info" />
<UnresolvableInclude errorLevel="info" />
<RawObjectIteration errorLevel="info" />
<InvalidStringClass errorLevel="info" />
</issueHandlers>
</psalm>