diff --git a/src/Generator.php b/src/Generator.php index add6bbc..01a0db3 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -87,7 +87,7 @@ public function generate(string $namespace, string $destinationPath) private function className(string $className): string { - return str_replace(['{', '}', '-'], ['Cb', 'Rcb', 'Dash'], (new Convert($className))->toPascal()); + return str_replace(['{', '}', '-', '$'], ['Cb', 'Rcb', 'Dash', '_'], (new Convert($className))->toPascal()); } private function cleanUpNamespace(string $namespace): string