mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 15:16:59 +00:00
Coding Standards: Use instanceof keyword instead of the is_a() function.
This is a micro-optimization that removes a few unnecessary function calls. Follow-up to [31188], [34369], [38986], [41159], [43211], [43230], [44606], [45757]. Props ayeshrajans, jrf, rajinsharwar, costdev, mukesh27, SergeyBiryukov. Fixes #58943. git-svn-id: https://develop.svn.wordpress.org/trunk@56352 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
abstract class WP_Test_REST_TestCase extends WP_UnitTestCase {
|
||||
protected function assertErrorResponse( $code, $response, $status = null ) {
|
||||
|
||||
if ( is_a( $response, 'WP_REST_Response' ) ) {
|
||||
if ( $response instanceof WP_REST_Response ) {
|
||||
$response = $response->as_error();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user