File tree Expand file tree Collapse file tree
rules/Unambiguous/Rector/Expression Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55namespace Rector \Unambiguous \Rector \Expression ;
66
7+ use PHPStan \Type \ObjectType ;
78use PhpParser \Node ;
89use PhpParser \Node \Expr ;
910use PhpParser \Node \Expr \Assign ;
@@ -145,10 +146,10 @@ private function resolveVariableName(Expr $expr): string
145146 private function shouldSkipForVendorOrInternal (Expr |MethodCall |null $ firstMethodCall ): bool
146147 {
147148 $ callerType = $ this ->getType ($ firstMethodCall );
148- if ($ callerType instanceof \ PHPStan \ Type \ ObjectType) {
149+ if ($ callerType instanceof ObjectType) {
149150 $ fileName = $ callerType ->getClassReflection ()
150151 ->getFileName ();
151- if ($ fileName === false || str_contains ($ fileName , 'vendor ' )) {
152+ if (str_contains (( string ) $ fileName , 'vendor ' )) {
152153 return true ;
153154 }
154155 }
You can’t perform that action at this time.
0 commit comments