MontealegreLuis / phuml

phUML is a UML diagram generator. It takes arbitrary object oriented PHP code and creates fully blown class diagrams of it.
BSD 3-Clause "New" or "Revised" License
100 stars 19 forks source link

Spread Arguments #4

Closed kingga closed 3 years ago

kingga commented 4 years ago

image

public function __construct(IDatabaseConfig ...$dbconfigs)

Should this be displayed as $dbconfigs: IDatabaseConfig[]

MontealegreLuis commented 3 years ago

Hi @kingga I have added support for variadics in this release: https://github.com/MontealegreLuis/phuml/releases/tag/3.0.0

It includes support for variadics as well as by reference parameters.

Variadic parameters will render as ...$dbconfigs: IDatabaseConfig. I understand they're technically an array, but wanted to make a distinction between them and methods that receive an actual array.