Closed Eydamos closed 3 years ago
Use setVariadic() on method.
Ok thank you. Would not have expected that on the method as the parameter is a variadic and not the method. But good that it is possible. Would be cool if you could add this to the documentation on https://doc.nette.org/
If you can sent PR to documentation, it would be best.
https://github.com/nette/docs/blob/doc-3.1/en/php-generator.texy
Simple example:
Would result in the following:
The space between the variadic operator
...
and the variable name$entities
is not allowed by PSR12 standard. A method likesetVariadic(bool $state = true): self;
on theNette\PhpGenerator\Parameter
could help with that.