mirror of
https://github.com/elyby/accounts.git
synced 2024-12-24 06:09:52 +05:30
22 lines
418 B
PHP
22 lines
418 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace common\tests\_support;
|
|
|
|
use ReflectionClass;
|
|
|
|
/**
|
|
* @deprecated
|
|
*/
|
|
trait ProtectedCaller {
|
|
|
|
protected function callProtected(object $object, string $methodName, ...$args) {
|
|
$class = new ReflectionClass($object);
|
|
$method = $class->getMethod($methodName);
|
|
$method->setAccessible(true);
|
|
|
|
return $method->invokeArgs($object, $args);
|
|
}
|
|
|
|
}
|