Skip to content
Permalink
Browse files

Fix Psalm errors

  • Loading branch information...
muglug committed May 24, 2019
1 parent c80f9d8 commit 13b9e133e46e0524908a0f56529cd273673fff88
@@ -347,27 +347,29 @@ public static function analyzeInstance(
}
}
$fake_method_call = new PhpParser\Node\Expr\MethodCall(
$stmt->var,
new PhpParser\Node\Identifier('__set', $stmt->name->getAttributes()),
[
new PhpParser\Node\Arg(
new PhpParser\Node\Scalar\String_(
$prop_name,
$stmt->name->getAttributes()
if ($assignment_value) {
$fake_method_call = new PhpParser\Node\Expr\MethodCall(
$stmt->var,
new PhpParser\Node\Identifier('__set', $stmt->name->getAttributes()),
[
new PhpParser\Node\Arg(
new PhpParser\Node\Scalar\String_(
$prop_name,
$stmt->name->getAttributes()
)
),
new PhpParser\Node\Arg(
$assignment_value
)
),
new PhpParser\Node\Arg(
$assignment_value
)
]
);
]
);
\Psalm\Internal\Analyzer\Statements\Expression\Call\MethodCallAnalyzer::analyze(
$statements_analyzer,
$fake_method_call,
$context
);
\Psalm\Internal\Analyzer\Statements\Expression\Call\MethodCallAnalyzer::analyze(
$statements_analyzer,
$fake_method_call,
$context
);
}
/*
* If we have an explicit list of all allowed magic properties on the class, and we're
@@ -1798,6 +1798,8 @@ private function registerFunctionLike(PhpParser\Node\FunctionLike $stmt, $fake_m
)
)) {
}
$template_type = Type::getMixed();
}
} else {
if (IssueBuffer::accepts(

0 comments on commit 13b9e13

Please sign in to comment.
You can’t perform that action at this time.