Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Fix Psalm warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai committed Nov 11, 2020
1 parent e252a22 commit a6eed44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 45 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: ci test prerequisites

# Use any most recent PHP version
PHP=$(shell which php7.4 || which php)
PHP=$(shell which php)
PHPDBG=$(shell which phpdbg && echo -qrr || echo php)

# Default parallelism
Expand Down Expand Up @@ -34,7 +34,6 @@ PHPSTAN_ARGS=analyse src tests --level=2 -c .phpstan.neon
# Psalm
PSALM=vendor/bin/psalm
PSALM_ARGS=--show-info=false
PSALM_PHP_VERSION="PHP 7.3"

# Composer
COMPOSER=$(PHP) $(shell which composer)
Expand All @@ -44,7 +43,6 @@ INFECTION=vendor/bin/infection
MIN_MSI=96
MIN_COVERED_MSI=99
INFECTION_ARGS=--min-msi=$(MIN_MSI) --min-covered-msi=$(MIN_COVERED_MSI) --threads=$(JOBS) --coverage=build/logs --log-verbosity=default --show-mutations --no-interaction
INFECTION_PHP_VERSION="PHP 7.3"

all: test

Expand Down
45 changes: 3 additions & 42 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,16 @@
totallyTyped="true"
allowPhpStormGenerics="true"
cacheDirectory="build/"
errorLevel="5"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config file:///home/lesha/workspace/Cdek-SDK/vendor/vimeo/psalm/config.xsd"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src" />
<directory name="examples" />
<directory name="tests/Integration" />
<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" />

<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" />
<ImplementedReturnTypeMismatch errorLevel="info" />

<PossiblyInvalidMethodCall errorLevel="info" />
<PossiblyInvalidArgument errorLevel="info" />

<ReservedWord errorLevel="info" />
</issueHandlers>
</psalm>

0 comments on commit a6eed44

Please sign in to comment.