We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d319a2 commit f23650bCopy full SHA for f23650b
rules/TypeDeclaration/NodeAnalyzer/StrictTypeSafetyChecker.php
@@ -197,6 +197,11 @@ private function isPropertyAssignSafe(Assign $assign): bool
197
198
private function isTypeSafeForStrictMode(Type $declaredType, Type $valueType): bool
199
{
200
+ // this is a workaround for a phpstan bug
201
+ if ($valueType instanceof MixedType) {
202
+ return $declaredType instanceof MixedType;
203
+ }
204
+
205
return $declaredType->accepts($valueType, strictTypes: true)
206
->yes();
207
}
0 commit comments