GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — 4.2-to-master ( ed215f )
by E
06:47
created

MethodInvoker::callMethodOnObject()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 3
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace ApiGen\Tests;
4
5
use ReflectionClass;
6
7
final class MethodInvoker
8
{
9
    /**
10
     * @param object $object
11
     * @param string $method
12
     * @param mixed[] $args
13
     * @return mixed
14
     */
15
    public static function callMethodOnObject($object, string $method, array $args = [])
16
    {
17
        $classReflection = new ReflectionClass($object);
18
        $methodReflection = $classReflection->getMethod($method);
19
        $methodReflection->setAccessible(true);
20
21
        return $methodReflection->invokeArgs($object, $args);
22
    }
23
}
24