File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -239,13 +239,14 @@ public static function convertFile(string $path)
239
239
$ attributeLinesBuffer = [];
240
240
$ usingsAdded = false ;
241
241
$ paramAttributeClass = self ::shortenClass (RequestParamAttribute::class);
242
+ $ paramTypeClass = self ::shortenClass (RequestParamType::class);
242
243
foreach (preg_split ("/(( \r? \n)|( \r\n?))/ " , $ withInterleavedAttributes ) as $ line ) {
243
244
// detected the initial "use" block, add usings for new types
244
245
if (!$ usingsAdded && strlen ($ line ) > 3 && substr ($ line , 0 , 3 ) === "use " ) {
245
- $ lines [] = "use App\Helpers\MetaFormats\Attributes\{ $ paramAttributeClass}; " ;
246
- $ lines [] = "use App\Helpers\MetaFormats\RequestParamType ; " ;
246
+ $ lines [] = "use App \\ Helpers \\ MetaFormats \\ Attributes \ \{$ paramAttributeClass }; " ;
247
+ $ lines [] = "use App \\ Helpers \\ MetaFormats \\{ $ paramTypeClass } ; " ;
247
248
foreach (self ::getValidatorNames () as $ validator ) {
248
- $ lines [] = "use App\Helpers\MetaFormats\Validators\{ $ validator}; " ;
249
+ $ lines [] = "use App \\ Helpers \\ MetaFormats \\ Validators \ \{$ validator }; " ;
249
250
}
250
251
// write the detected line (the first detected "use" line)
251
252
$ lines [] = $ line ;
You can’t perform that action at this time.
0 commit comments