@@ -138,7 +138,7 @@ protected function generateClassFromFile(
138138 string $ schemaProviderClass = RecursiveDirectoryProvider::class
139139 ): string {
140140 return $ this ->generateClass (
141- file_get_contents (__DIR__ . ' /Schema/ ' . $ this ->getStaticClassName () . ' / ' . $ file ),
141+ file_get_contents ($ this ->getSchemaFilePath ( $ file) ),
142142 $ generatorConfiguration ,
143143 $ originalClassNames ,
144144 $ implicitNull ,
@@ -171,16 +171,13 @@ protected function generateClassFromFileTemplate(
171171 string $ schemaProviderClass = RecursiveDirectoryProvider::class
172172 ): string {
173173 return $ this ->generateClass (
174- call_user_func_array (
175- 'sprintf ' ,
176- array_merge (
177- [file_get_contents (__DIR__ . '/Schema/ ' . $ this ->getStaticClassName () . '/ ' . $ file )],
178- array_map (
179- static function (string $ item ) use ($ escape ): string {
180- return $ escape ? str_replace ("' " , '" ' , addcslashes ($ item , '" \\' )) : $ item ;
181- },
182- $ values
183- )
174+ sprintf (
175+ file_get_contents ($ this ->getSchemaFilePath ($ file )),
176+ ...array_map (
177+ static function (string $ item ) use ($ escape ): string {
178+ return $ escape ? str_replace ("' " , '" ' , addcslashes ($ item , '" \\' )) : $ item ;
179+ },
180+ $ values
184181 )
185182 ),
186183 $ generatorConfiguration ,
@@ -517,6 +514,11 @@ protected function getGeneratedFiles(): array
517514 return $ this ->generatedFiles ;
518515 }
519516
517+ protected function getSchemaFilePath (string $ file ): string
518+ {
519+ return __DIR__ . '/Schema/ ' . $ this ->getStaticClassName () . '/ ' . $ file ;
520+ }
521+
520522 /**
521523 * Generate a unique name for a class
522524 *
@@ -536,7 +538,7 @@ private function getClassName(): string
536538 return $ name ;
537539 }
538540
539- private function getStaticClassName (): string
541+ protected function getStaticClassName (): string
540542 {
541543 $ parts = explode ('\\' , static ::class);
542544
0 commit comments