File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
rules/TypeDeclaration/NodeAnalyzer Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1717use PHPStan \Reflection \Php \PhpPropertyReflection ;
1818use PHPStan \Type \MixedType ;
1919use PHPStan \Type \NeverType ;
20+ use PHPStan \Type \StrictMixedType ;
2021use PHPStan \Type \Type ;
2122use Rector \NodeTypeResolver \NodeTypeResolver ;
2223use Rector \NodeTypeResolver \PHPStan \ParametersAcceptorSelectorVariantsWrapper ;
@@ -173,6 +174,10 @@ private function isPropertyAssignSafe(Assign $assign): bool
173174 }
174175 private function isTypeSafeForStrictMode (Type $ declaredType , Type $ valueType ): bool
175176 {
177+ // need to be strict with mixed to avoid false positives
178+ if ($ valueType instanceof MixedType) {
179+ $ valueType = new StrictMixedType ();
180+ }
176181 return $ declaredType ->accepts ($ valueType , \true)->yes ();
177182 }
178183}
Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ final class VersionResolver
1919 * @api
2020 * @var string
2121 */
22- public const PACKAGE_VERSION = '0a5ae872786600d59a93e719f634603e852addec ' ;
22+ public const PACKAGE_VERSION = '9450ef9233da2d735754ed380885129aee1774ae ' ;
2323 /**
2424 * @api
2525 * @var string
2626 */
27- public const RELEASE_DATE = '2026-01-22 00:58:10 ' ;
27+ public const RELEASE_DATE = '2026-01-22 13:35:33 ' ;
2828 /**
2929 * @var int
3030 */
You can’t perform that action at this time.
0 commit comments