Skip to content

Commit f5b78d5

Browse files
committed
Compatibility with naughty projects
1 parent d281214 commit f5b78d5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Analyser/MutatingScope.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3643,8 +3643,11 @@ private function specifyExpressionType(Expr $expr, Type $type, Type $nativeType)
36433643
]);
36443644
}
36453645

3646-
public function assignExpression(Expr $expr, Type $type, Type $nativeType): self
3646+
public function assignExpression(Expr $expr, Type $type, ?Type $nativeType = null): self
36473647
{
3648+
if ($nativeType === null) {
3649+
$nativeType = new MixedType();
3650+
}
36483651
$scope = $this;
36493652
if ($expr instanceof PropertyFetch) {
36503653
$scope = $this->invalidateExpression($expr)

0 commit comments

Comments
 (0)