protected function formatStaticalProxyStub(string $alias, string $stub): string
    {
        $replacements = [
            \str_replace('/', '\\', \dirname(\str_replace('\\', '/', $alias))),
            self::getClassBasename($alias),
            \mb_substr($alias, \mb_strlen($this->staticalProxyNamespace)),
        ];

        return \str_replace(
            ['DummyNamespace', 'DummyClass', 'DummyTarget'],
            $replacements,
            $stub
        );
    }