Skip to content

Commit

Permalink
Merge pull request #661 from phel-lang/psalm-ignore-mixed-rules
Browse files Browse the repository at this point in the history
Increase Psalm level 1
  • Loading branch information
Chemaclass committed Feb 13, 2024
2 parents 7c45970 + 35752b4 commit bf7f973
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
15 changes: 14 additions & 1 deletion psalm.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<psalm
errorLevel="2"
errorLevel="1"
findUnusedBaselineEntry="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down Expand Up @@ -28,6 +28,19 @@
<ArgumentTypeCoercion errorLevel="suppress" />
<LessSpecificReturnStatement errorLevel="suppress" />
<NamedArgumentNotAllowed errorLevel="suppress" />
<MixedArgument errorLevel="suppress" />
<MixedArgumentTypeCoercion errorLevel="suppress" />
<MixedArrayAccess errorLevel="suppress" />
<MixedArrayAssignment errorLevel="suppress" />
<MixedArrayOffset errorLevel="suppress" />
<MixedAssignment errorLevel="suppress" />
<MixedFunctionCall errorLevel="suppress" />
<MixedInferredReturnType errorLevel="suppress" />
<MixedMethodCall errorLevel="suppress" />
<MixedOperand errorLevel="suppress" />
<MixedPropertyTypeCoercion errorLevel="suppress" />
<MixedReturnStatement errorLevel="suppress" />
<MixedReturnTypeCoercion errorLevel="suppress" />
<MoreSpecificReturnType errorLevel="suppress" />
<InvalidArrayOffset errorLevel="suppress" />
<RiskyTruthyFalsyComparison errorLevel="suppress" />
Expand Down
2 changes: 1 addition & 1 deletion src/php/Compiler/Domain/Parser/ParserNode/ListNode.php
Expand Up @@ -46,7 +46,7 @@ public function getCode(): string
$code .= $child->getCode();
}

return $this->getCodePrefix() . $code . $this->getCodePostfix();
return $this->getCodePrefix() . $code . ($this->getCodePostfix() ?? '');
}

public function getCodePrefix(): string
Expand Down
2 changes: 1 addition & 1 deletion src/php/Formatter/Domain/Rules/Indenter/InnerIndenter.php
Expand Up @@ -30,7 +30,7 @@ public function getMargin(ParseTreeZipper $loc, int $indentWidth): ?int
|| $this->indentMatches($this->symbol, $this->formSymbol($top))) {
$up = $loc->upSkipWhitespace();

return $this->lineIndenter->getMargin($up, $indentWidth) + $indentWidth;
return (int) $this->lineIndenter->getMargin($up, $indentWidth) + $indentWidth;
}

return null;
Expand Down

0 comments on commit bf7f973

Please sign in to comment.