[wp-trac] [WordPress Trac] #58943: Replace `is_a` calls in core with `instanceof`
WordPress Trac
noreply at wordpress.org
Mon Jul 31 12:14:21 UTC 2023
#58943: Replace `is_a` calls in core with `instanceof`
-------------------------+--------------------------------------------
Reporter: ayeshrajans | Owner: SergeyBiryukov
Type: enhancement | Status: accepted
Priority: normal | Milestone: 6.4
Component: General | Version: trunk
Severity: trivial | Resolution:
Keywords: has-patch | Focuses: performance, coding-standards
-------------------------+--------------------------------------------
Comment (by jrf):
I agree with @ayeshrajans, external libraries used by WP should not be
fixed here (though a patch upstream might be an idea if the library is
still externally maintained).
Re: use in tests - it should be considered if any such uses should be
replaced with an `assertInstanceof()` assertion instead ? (not saying they
should, just putting this out there as something to think about)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58943#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list