@@ -35,15 +35,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
35
35
36
36
$ output ->writeln ('These functions have been ignored and must be dealt with manually: ' .\implode (', ' , $ overloadedFunctions ));
37
37
38
- $ phpFunctions = [];
39
- foreach ($ functions as $ function ) {
40
- $ writePhpFunction = new WritePhpFunction ($ function );
41
- $ phpFunctions [] = $ writePhpFunction ->getPhpFunctionalFunction ();
42
- }
43
-
44
38
$ fileCreator = new FileCreator ();
45
39
//$fileCreator->generateXlsFile($protoFunctions, __DIR__ . '/../generated/lib.xls');
46
- $ fileCreator ->generatePhpFile ($ phpFunctions , __DIR__ . '/../generated/lib.php ' );
40
+ $ fileCreator ->generatePhpFile ($ functions , __DIR__ . '/../generated/ ' );
47
41
$ fileCreator ->generateFunctionsList ($ functions , __DIR__ . '/../generated/functionsList.php ' );
48
42
49
43
@@ -57,7 +51,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
57
51
}
58
52
59
53
// Finally, let's require the generated file to check there is no error.
60
- require __DIR__ .'/../generated/lib.php ' ;
54
+ $ files = \glob (__DIR__ .'/../generated/*.php ' );
55
+
56
+ foreach ($ files as $ file ) {
57
+ require ($ file );
58
+ }
61
59
}
62
60
63
61
private function rmGenerated (): void
@@ -68,9 +66,12 @@ private function rmGenerated(): void
68
66
\unlink ($ exception );
69
67
}
70
68
71
- if (\file_exists (__DIR__ .'/../generated/lib.php ' )) {
72
- \unlink (__DIR__ .'/../generated/lib.php ' );
69
+ $ files = \glob (__DIR__ .'/../generated/*.php ' );
70
+
71
+ foreach ($ files as $ file ) {
72
+ \unlink ($ file );
73
73
}
74
+
74
75
if (\file_exists (__DIR__ .'/../doc/entities/generated.ent ' )) {
75
76
\unlink (__DIR__ .'/../doc/entities/generated.ent ' );
76
77
}
0 commit comments