Closed simPod closed 2 years ago
Yeah, the main reason for my use of the use of variadics is to enforce type safety since there is no other way to explicitly say we will only accept an array of a certain object. I wish there was a better way to do this in PHP.
@ChadSikorra are you willing to change method signatures to arrays if I enforce type safety? Intend to setup https://github.com/phpstan/phpstan
I wouldn't mind changing the method signature for the constructor in general on that class, as it's pretty much internally constructed. I just took a look at phpstan...looks pretty nice. And splatting does have a performance penalty (though it's pretty minor).
Closing this out since PhpStan was integrated.
Hi, what is the reason for using spread operator eg. here https://github.com/FreeDSx/SNMP/blob/0157012f431700f29fc48731712808e0bed58c02/src/FreeDSx/Snmp/OidList.php#L36
Is it just type safety or something else? Thanks!