We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 61-67 (lines=7) @@ | ||
| 58 | * |
|
| 59 | * @return mixed Method return. |
|
| 60 | */ |
|
| 61 | protected function invokeMethod( $object, $method_name, array $parameters = [] ) { |
|
| 62 | $reflection = new \ReflectionClass( get_class( $object ) ); |
|
| 63 | $method = $reflection->getMethod( $method_name ); |
|
| 64 | $method->setAccessible( true ); |
|
| 65 | ||
| 66 | return $method->invokeArgs( $object, $parameters ); |
|
| 67 | } |
|
| 68 | ||
| 69 | /** |
|
| 70 | * Call protected/private method of a class. |
|
| @@ 78-84 (lines=7) @@ | ||
| 75 | * |
|
| 76 | * @return mixed Method return. |
|
| 77 | */ |
|
| 78 | protected function invokeStaticMethod( $classname, $method_name, array $parameters = [] ) { |
|
| 79 | $reflection = new \ReflectionClass( $classname ); |
|
| 80 | $method = $reflection->getMethod( $method_name ); |
|
| 81 | $method->setAccessible( true ); |
|
| 82 | ||
| 83 | return $method->invokeArgs( null, $parameters ); |
|
| 84 | } |
|
| 85 | ||
| 86 | /** |
|
| 87 | * Sets the value of a private/protected property of a class. |
|