@@ -138,7 +138,7 @@ protected function generateClassFromFile(
138
138
string $ schemaProviderClass = RecursiveDirectoryProvider::class
139
139
): string {
140
140
return $ this ->generateClass (
141
- file_get_contents (__DIR__ . ' /Schema/ ' . $ this ->getStaticClassName () . ' / ' . $ file ),
141
+ file_get_contents ($ this ->getSchemaFilePath ( $ file) ),
142
142
$ generatorConfiguration ,
143
143
$ originalClassNames ,
144
144
$ implicitNull ,
@@ -171,16 +171,13 @@ protected function generateClassFromFileTemplate(
171
171
string $ schemaProviderClass = RecursiveDirectoryProvider::class
172
172
): string {
173
173
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
184
181
)
185
182
),
186
183
$ generatorConfiguration ,
@@ -517,6 +514,11 @@ protected function getGeneratedFiles(): array
517
514
return $ this ->generatedFiles ;
518
515
}
519
516
517
+ protected function getSchemaFilePath (string $ file ): string
518
+ {
519
+ return __DIR__ . '/Schema/ ' . $ this ->getStaticClassName () . '/ ' . $ file ;
520
+ }
521
+
520
522
/**
521
523
* Generate a unique name for a class
522
524
*
@@ -536,7 +538,7 @@ private function getClassName(): string
536
538
return $ name ;
537
539
}
538
540
539
- private function getStaticClassName (): string
541
+ protected function getStaticClassName (): string
540
542
{
541
543
$ parts = explode ('\\' , static ::class);
542
544
0 commit comments