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:
Sergey Biryukov
2023-08-03 12:08:30 +00:00
parent f8b4e2c184
commit b92491b8d2
7 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -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();
}