File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed
Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change 4242use PHPStan \Type \Enum \EnumCaseObjectType ;
4343use PHPStan \Type \Generic \GenericClassStringType ;
4444use PHPStan \Type \Generic \GenericObjectType ;
45- use PHPStan \Type \Generic \TemplateType ;
4645use PHPStan \Type \Generic \TemplateTypeHelper ;
4746use PHPStan \Type \Traits \MaybeIterableTypeTrait ;
4847use PHPStan \Type \Traits \NonArrayTypeTrait ;
@@ -626,19 +625,7 @@ public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
626625
627626 public function equals (Type $ type ): bool
628627 {
629- if (!$ type instanceof self) {
630- return false ;
631- }
632-
633- if ($ type instanceof EnumCaseObjectType) {
634- return false ;
635- }
636-
637- if ($ type instanceof TemplateType) {
638- return false ;
639- }
640-
641- if ($ type instanceof GenericObjectType && !$ this instanceof GenericObjectType) {
628+ if (get_class ($ type ) !== static ::class) {
642629 return false ;
643630 }
644631
You can’t perform that action at this time.
0 commit comments