Make WordPress Core


Ignore:
Timestamp:
09/25/2023 03:34:34 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Fix a few newly introduced WPCS issues.

Follow-up to [56570], [56573], [56589], [56604], [56612], [56620], [56629], [56631], [56638], [56642], [56644], [56649].

Props jrf.
See #59161, #58831.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/wpTermsListTable.php

    r56631 r56680  
    4242         * Call an inaccessible (private or protected) method.
    4343         *
    44          * @param object|string $object      Object instance or class string to call the method of.
     44         * @param object|string $instance    Object instance or class string to call the method of.
    4545         * @param string        $method_name Name of the method to call.
    4646         * @param array         $args        Optional. Array of arguments to pass to the method.
    … …  
    4848         * @throws ReflectionException If the object could not be reflected upon.
    4949         */
    50         private function call_inaccessible_method( $object, $method_name, $args = array() ) {
    51                 $method = ( new ReflectionClass( $object ) )->getMethod( $method_name );
     50        private function call_inaccessible_method( $instance, $method_name, $args = array() ) {
     51                $method = ( new ReflectionClass( $instance ) )->getMethod( $method_name );
    5252                $method->setAccessible( true );
    53                 return $method->invokeArgs( $object, $args );
     53                return $method->invokeArgs( $instance, $args );
    5454        }
    5555
Note: See TracChangeset for help on using the changeset viewer.