Closed ayaseensd closed 2 years ago
Why not add another optional parameter to the render function?
public function render(array $options = [], string $file = null): string {
$options = new QROptions($options);
return (new QRCode($options))->render($this->toBase64(), $file ?? null);
}
I think its more IDE friendly and most importantly cleaner.
@ali-alharthi I first implemented this approach, which is similar to chillerlan/php-qrcode implementation in that I intended to run render method unconditionally params order, so render($options), render($file),render($file,$options) or render($options,$file)
.
but I think you are right.
@ayaseensd @ali-alharthi thank you for your contributions
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behaviour? (You can also link to an open issue here)
What is the new behaviour? (You can also link to the ticket here)
Does this PR introduce a breaking change?