src/TypesGenerator.php
private function namespaceToDir(array $config, string $namespace): string
    {
        if (null !== ($prefix = $config['namespaces']['prefix'] ?? null) && 0 === strpos($namespace, $prefix)) {
            $namespace = substr($namespace, strlen($prefix));
        }

        return sprintf('%s/%s/', $config['output'], strtr($namespace, '\\', '/'));
    }
private function namespaceToDir(array $config, string $namespace): string
    {
        if (null !== ($prefix = $config['namespaces']['prefix'] ?? null) && 0 === strpos($namespace, $prefix)) {
            $namespace = substr($namespace, strlen($prefix));
        }

        return sprintf('%s/%s/', $config['output'], strtr($namespace, '\\', '/'));
    }
Converts a namespace to a directory path according to PSR-4.