From c01202bc100b4a94980031b80ff033db651a44c1 Mon Sep 17 00:00:00 2001 From: Milan Date: Sun, 17 Oct 2021 21:08:32 +0300 Subject: [PATCH] Make verifySSL argument as first option in constructor --- lib/Providers/Qr/GoogleChartsQrCodeProvider.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Providers/Qr/GoogleChartsQrCodeProvider.php b/lib/Providers/Qr/GoogleChartsQrCodeProvider.php index 3b300ff..1f8cfad 100644 --- a/lib/Providers/Qr/GoogleChartsQrCodeProvider.php +++ b/lib/Providers/Qr/GoogleChartsQrCodeProvider.php @@ -15,13 +15,18 @@ class GoogleChartsQrCodeProvider extends BaseHTTPQRCodeProvider public $encoding; /** + * @param bool $verifyssl * @param string $errorcorrectionlevel * @param int $margin * @param string $encoding */ - public function __construct($errorcorrectionlevel = 'L', $margin = 4, $encoding = 'UTF-8', $verifySSL = true) + public function __construct($verifyssl = false, $errorcorrectionlevel = 'L', $margin = 4, $encoding = 'UTF-8') { - $this->verifyssl = $verifySSL; + if (!is_bool($verifyssl)) { + throw new QRException('VerifySSL must be bool'); + } + + $this->verifyssl = $verifyssl; $this->errorcorrectionlevel = $errorcorrectionlevel; $this->margin = $margin;