1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00

Fix undefined var

This commit is contained in:
Matthew Brown 2019-12-31 09:13:18 -05:00
parent 16b8edd583
commit f79088a955

View File

@ -2609,7 +2609,7 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
}
/**
* @return ?array<int, string>
* @return ?list<string>
*/
private function getAssertionParts(
string $assertion_type,
@ -2681,6 +2681,8 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
$this->function_template_types + $class_template_types
);
$assertion_type_parts = [];
foreach ($namespaced_type->getTypes() as $namespaced_type_part) {
if ($namespaced_type_part instanceof Type\Atomic\TAssertionFalsy
|| ($namespaced_type_part instanceof Type\Atomic\TList