mirror of
				https://github.com/elyby/accounts.git
				synced 2025-05-31 14:11:46 +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);
 | 
						|
    }
 | 
						|
 | 
						|
}
 |