mirror of
https://github.com/elyby/accounts.git
synced 2024-12-26 15:10:22 +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);
|
|
}
|
|
|
|
}
|