generator/src/FileCreator.php
public function generateFunctionsList(array $functions, string $path): void
    {
        $functionNames = $this->getFunctionsNameList($functions);
        $stream = fopen($path, 'w');
        if ($stream === false) {
            throw new \RuntimeException('Unable to write to '.$path);
        }
        fwrite($stream, "<?php\n
return [\n");
        foreach ($functionNames as $functionName) {
            fwrite($stream, '    '.\var_export($functionName, true).",\n");
        }
        fwrite($stream, "];\n");
        fclose($stream);
    }
public function generateFunctionsList(array $functions, string $path): void
    {
        $functionNames = $this->getFunctionsNameList($functions);
        $stream = fopen($path, 'w');
        if ($stream === false) {
            throw new \RuntimeException('Unable to write to '.$path);
        }
        fwrite($stream, "<?php\n
return [\n");
        foreach ($functionNames as $functionName) {
            fwrite($stream, '    '.\var_export($functionName, true).",\n");
        }
        fwrite($stream, "];\n");
        fclose($stream);
    }
public function generateFunctionsList ( array $ functions , string $ path ) : void { $ functionNames = $ this -> getFunctionsNameList ( $ functions ) ; $ stream = fopen ( $ path , 'w' ) ; if ( $ stream === false ) { throw new \ RuntimeException ( 'Unable to write to ' . $ path ) ; } fwrite ( $ stream , "<?php\n
return [\n" ) ; foreach ( $ functionNames as $ functionName ) { fwrite ( $ stream , '    ' . \ var_export ( $ functionName , true ) . ",\n" ) ; } fwrite ( $ stream , "];\n" ) ; fclose ( $ stream ) ; }
This function generate a PHP file containing the list of functions we can handle.

@param Method[] $functions
@param string $path
This function generate a PHP file containing the list of functions we can handle .