src/main/php/NewInstance.php
private static function forkCallMapClass(\ReflectionClass $class): \ReflectionClass
    {
        if ($class->isTrait()) {
            $class = self::forkTrait($class);
        }

        try {
            $compile = self::$compile;
            $compile(self::createCallmapProxyCode($class));
        } catch (\ParseError $pe) {
            throw new ProxyCreationFailure(
                    'Failure while creating CallMap instance of '
                    . $class->getName() . ': ' . $pe->getMessage(),
                    $pe
            );
        }

        return new \ReflectionClass($class->getName() . 'CallMapProxy');
    }
private static function forkCallMapClass(\ReflectionClass $class): \ReflectionClass
    {
        if ($class->isTrait()) {
            $class = self::forkTrait($class);
        }

        try {
            $compile = self::$compile;
            $compile(self::createCallmapProxyCode($class));
        } catch (\ParseError $pe) {
            throw new ProxyCreationFailure(
                    'Failure while creating CallMap instance of '
                    . $class->getName() . ': ' . $pe->getMessage(),
                    $pe
            );
        }

        return new \ReflectionClass($class->getName() . 'CallMapProxy');
    }
private static function forkCallMapClass ( \ ReflectionClass $ class ) : \ ReflectionClass { if ( $ class -> isTrait ( ) ) { $ class = self :: forkTrait ( $ class ) ; } try { $ compile = self :: $ compile ; $ compile ( self :: createCallmapProxyCode ( $ class ) ) ; } catch ( \ ParseError $ pe ) { throw new ProxyCreationFailure ( 'Failure while creating CallMap instance of ' . $ class -> getName ( ) . ': ' . $ pe -> getMessage ( ) , $ pe ) ; } return new \ ReflectionClass ( $ class -> getName ( ) . 'CallMapProxy' ) ; }
creates a new class from the given class which uses the CallMap trait

@param   \ReflectionClass  $class
@return  \ReflectionClass
@throws  ProxyCreationFailure
creates a new class from the given class which uses the CallMap trait