Skip to content

Commit

Permalink
Update to Psalm 4
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Oct 25, 2020
1 parent fcfea17 commit 0685539
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .phive/phars.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="php-cs-fixer" version="^2.16" installed="2.16.4" location="./tools/php-cs-fixer" copy="true"/>
<phar name="psalm" version="^3.8" installed="3.18.2" location="./tools/psalm" copy="true"/>
<phar name="psalm" version="^4.0" installed="4.0.1" location="./tools/psalm" copy="true"/>
<phar name="roave/backwardcompatibilitycheck" version="^5.0.0" installed="5.0.0" location="./tools/roave-backward-compatibility-check" copy="true"/>
</phive>
7 changes: 6 additions & 1 deletion .psalm/baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="3.16@d03e5ef057d6adc656c0ff7e166c50b73b4f48f3">
<files psalm-version="4.0.1@b1e2e30026936ef8d5bf6a354d1c3959b6231f44">
<file src="src/Exporter.php">
<ConflictingReferenceConstraint occurrences="1">
<code>if (is_object($value)) {</code>
Expand All @@ -11,5 +11,10 @@
<code>$hash</code>
<code>$key</code>
</InvalidScalarArgument>
<MissingParamType occurrences="3">
<code>$value</code>
<code>$value</code>
<code>$value</code>
</MissingParamType>
</file>
</files>
47 changes: 4 additions & 43 deletions .psalm/config.xml
@@ -1,56 +1,17 @@
<?xml version="1.0"?>
<psalm
totallyTyped="false"
cacheDirectory=".psalm/cache"
errorBaseline=".psalm/baseline.xml"
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"
resolveFromConfigFile="false"
cacheDirectory=".psalm/cache"
errorBaseline=".psalm/baseline.xml"
totallyTyped="false"
>
<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" />
<DeprecatedFunction 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>
Binary file modified tools/psalm
Binary file not shown.

0 comments on commit 0685539

Please sign in to comment.