Skip to content

Commit

Permalink
Remove unnecessary bug circumvention and generate new baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
ralila committed Dec 5, 2021
1 parent da3a691 commit 1d2b149
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 32 deletions.
29 changes: 2 additions & 27 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="dev-master@6941ebfc5318e3782e59bfb85876e5edc1f7cca6">
<files psalm-version="dev-master@ac230dac5c64b1b4c7f4bd2d067fb7ae6176b6e8">
<file src="examples/TemplateChecker.php">
<PossiblyUndefinedIntArrayOffset occurrences="2">
<code>$comment_block-&gt;tags['variablesfrom'][0]</code>
Expand Down Expand Up @@ -255,7 +255,7 @@
</file>
<file src="src/Psalm/Internal/Analyzer/Statements/ThrowAnalyzer.php">
<DeprecatedMethod occurrences="1">
<code>\Psalm\Type::getEmpty()</code>
<code>Type::getEmpty()</code>
</DeprecatedMethod>
</file>
<file src="src/Psalm/Internal/Analyzer/Statements/UnsetAnalyzer.php">
Expand Down Expand Up @@ -459,31 +459,6 @@
<code>array_keys($template_type_map[$template_param_name])[0]</code>
</PossiblyUndefinedIntArrayOffset>
</file>
<file src="src/Psalm/Node/Stmt/VirtualClass.php">
<PropertyNotSetInConstructor occurrences="1">
<code>VirtualClass</code>
</PropertyNotSetInConstructor>
</file>
<file src="src/Psalm/Node/Stmt/VirtualFunction.php">
<PropertyNotSetInConstructor occurrences="1">
<code>VirtualFunction</code>
</PropertyNotSetInConstructor>
</file>
<file src="src/Psalm/Node/Stmt/VirtualInterface.php">
<PropertyNotSetInConstructor occurrences="1">
<code>VirtualInterface</code>
</PropertyNotSetInConstructor>
</file>
<file src="src/Psalm/Node/Stmt/VirtualTrait.php">
<PropertyNotSetInConstructor occurrences="1">
<code>VirtualTrait</code>
</PropertyNotSetInConstructor>
</file>
<file src="src/Psalm/Node/VirtualConst.php">
<PropertyNotSetInConstructor occurrences="1">
<code>VirtualConst</code>
</PropertyNotSetInConstructor>
</file>
<file src="src/Psalm/Storage/Assertion.php">
<PossiblyUndefinedIntArrayOffset occurrences="1">
<code>$rules[0]</code>
Expand Down
6 changes: 1 addition & 5 deletions src/Psalm/Internal/Analyzer/Statements/ThrowAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,7 @@ public static function analyze(
}

if ($stmt instanceof PhpParser\Node\Expr\Throw_) {
// TODO: Find bug in Psalm:
// Conversion to "Type::getEmpty()" triggers Psalm DeprecatedMethod, which is correct
// To be investigated: Why isn’t it triggered with "\Psalm\Type::getEmpty()"?!
// @phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName
$statements_analyzer->node_data->setType($stmt, \Psalm\Type::getEmpty());
$statements_analyzer->node_data->setType($stmt, Type::getEmpty());
}

return true;
Expand Down

0 comments on commit 1d2b149

Please sign in to comment.