Commit bb15b8d
Re-apply get_class() simplification in ObjectType::equals()
The previous revert (9f0da34) was based on a faulty premise that
TemplateObjectType has no equals() override. In fact, TemplateObjectType
gets its equals() from TemplateTypeTrait, so get_class($type) !== static::class
is correct and equivalent to the explicit instanceof checks.
All tests (11726) and make phpstan pass with this simpler approach.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent faa8fc9 commit bb15b8d
2 files changed
+4
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1473 | 1473 | | |
1474 | 1474 | | |
1475 | 1475 | | |
1476 | | - | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
1482 | 1476 | | |
1483 | 1477 | | |
1484 | 1478 | | |
1485 | | - | |
| 1479 | + | |
1486 | 1480 | | |
1487 | 1481 | | |
1488 | 1482 | | |
1489 | 1483 | | |
1490 | 1484 | | |
1491 | | - | |
| 1485 | + | |
1492 | 1486 | | |
1493 | 1487 | | |
1494 | 1488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
624 | 625 | | |
625 | 626 | | |
626 | 627 | | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
| 628 | + | |
636 | 629 | | |
637 | 630 | | |
638 | 631 | | |
| |||
0 commit comments