src/Codecontrol/PHPUnitHelper/Utility.php
public static function setClassMemberAsAccessible(
        $classOrObj,
        $member,
        $type
    ) {
        $class = is_object($classOrObj) ? get_class($classOrObj) : $classOrObj;
        $method = $type == 'method' ? 'getMethod' : 'getProperty';

        $member = (new \ReflectionClass($class))->{$method}($member);
        $member->setAccessible(true);

        return $member;
    }
public static function setClassMemberAsAccessible(
        $classOrObj,
        $member,
        $type
    ) {
        $class = is_object($classOrObj) ? get_class($classOrObj) : $classOrObj;
        $method = $type == 'method' ? 'getMethod' : 'getProperty';

        $member = (new \ReflectionClass($class))->{$method}($member);
        $member->setAccessible(true);

        return $member;
    }
public static function setClassMemberAsAccessible ( $ classOrObj , $ member , $ type ) { $ class = is_object ( $ classOrObj ) ? get_class ( $ classOrObj ) : $ classOrObj ; $ method = $ type == 'method' ? 'getMethod' : 'getProperty' ; $ member = ( new \ ReflectionClass ( $ class ) ) -> { $ method } ( $ member ) ; $ member -> setAccessible ( true ) ; return $ member ; }
@param mixed  $classOrObj
@param string $member
@param string $type

@return mixed
@param mixed $classOrObj @param string $member @param string $type