File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
rules/DeadCode/Rector/Cast Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 2424use PHPStan \Type \ObjectType ;
2525use PHPStan \Type \StringType ;
2626use PHPStan \Type \Type ;
27+ use PHPStan \Type \UnionType ;
2728use Rector \NodeAnalyzer \ExprAnalyzer ;
2829use Rector \NodeAnalyzer \PropertyFetchAnalyzer ;
2930use Rector \Rector \AbstractRector ;
@@ -126,6 +127,14 @@ private function shouldSkipCall(Expr $expr) : bool
126127 }
127128 private function shouldSkip (Expr $ expr ) : bool
128129 {
130+ $ type = $ this ->getType ($ expr );
131+ if ($ type instanceof UnionType) {
132+ foreach ($ type ->getTypes () as $ unionedType ) {
133+ if ($ unionedType instanceof MixedType) {
134+ return \true;
135+ }
136+ }
137+ }
129138 if (!$ this ->propertyFetchAnalyzer ->isPropertyFetch ($ expr )) {
130139 return $ this ->exprAnalyzer ->isNonTypedFromParam ($ expr );
131140 }
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 = 'a4c489ee0914233600f93379edee4932ce2d4ee4 ' ;
22+ public const PACKAGE_VERSION = '95a145f9311826749ea9e72f44c3a3adb2a030f3 ' ;
2323 /**
2424 * @api
2525 * @var string
2626 */
27- public const RELEASE_DATE = '2025-02-05 11:37:04 ' ;
27+ public const RELEASE_DATE = '2025-02-05 15:47:13 ' ;
2828 /**
2929 * @var int
3030 */
You can’t perform that action at this time.
0 commit comments