@@ -47,16 +47,22 @@ static function (SplFileInfo $file) use ($tab): string {
47
47
$ function = $ file ->getFilenameWithoutExtension ();
48
48
$ namespace = str_replace ('/ ' , '\\' , $ file ->getRelativePath ());
49
49
50
- return sprintf ($ tab .' $functions[ \'%s \'] = __DIR__. \'/%s \'; ' , $ namespace .'\\' .$ function , $ path );
50
+ return sprintf ($ tab .$ tab . ' \'%s \' => __DIR__. \'/%s \', ' , $ namespace .'\\' .$ function , $ path );
51
51
}
52
52
),
53
- static fn (iterable $ codeLines ): iterable => concat ([
54
- '<?php declare(strict_types=1); ' ,
55
- '' ,
56
- '(static function (): void { ' ,
57
- $ tab . '/** @var array<string, string> $functions */ ' ,
58
- $ tab . '$functions = []; ' ,
59
- ], $ codeLines ),
53
+ static fn (iterable $ codeLines ): iterable => concat (
54
+ [
55
+ '<?php declare(strict_types=1); ' ,
56
+ '' ,
57
+ '(static function (): void { ' ,
58
+ $ tab . '/** @var array<string, string> $functions */ ' ,
59
+ $ tab . '$functions = [ ' ,
60
+ ],
61
+ $ codeLines ,
62
+ [
63
+ $ tab .']; '
64
+ ]
65
+ ),
60
66
static fn (iterable $ codeLines ): iterable => concat ($ codeLines , ['' , $ autoload , '})(); ' , '' ]),
61
67
static fn (iterable $ codeLines ): string => join ($ codeLines , PHP_EOL )
62
68
);
0 commit comments