From 15bbb97ab04dc5a4506b24030f463cd94c8bf9b3 Mon Sep 17 00:00:00 2001 From: AskinSavascisi Date: Sun, 2 Feb 2025 19:48:06 +0100 Subject: [PATCH] Update Generator.php Fix deprecated nullable parameter warning for generate() method in PHP 8.1+ --- src/Generator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Generator.php b/src/Generator.php index 4ada416..18bd1d3 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -166,7 +166,7 @@ public function __call($method, array $arguments) * @throws WriterException * @throws InvalidArgumentException */ - public function generate(string $text, string $filename = null) + public function generate(string $text, ?string $filename = null) { $qrCode = $this->getWriter($this->getRenderer())->writeString($text, $this->encoding, $this->errorCorrection);