From d8bdd0b9a36cf31d939f377561b71c4193db4d1d Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 6 May 2024 17:08:19 +1200 Subject: [PATCH 1/2] Allow constructing with null scheme --- src/DSN/DSN.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DSN/DSN.php b/src/DSN/DSN.php index 0eb0ef2..3e6f3e8 100644 --- a/src/DSN/DSN.php +++ b/src/DSN/DSN.php @@ -5,9 +5,9 @@ class DSN { /** - * @var string + * @var ?string */ - protected string $scheme; + protected ?string $scheme; /** * @var ?string From 09521c1fb6dc5488df5e89eeb6b3ca5e736fd97c Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 6 May 2024 17:15:19 +1200 Subject: [PATCH 2/2] Add nullable to getScheme return type --- src/DSN/DSN.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DSN/DSN.php b/src/DSN/DSN.php index 3e6f3e8..c6d5746 100644 --- a/src/DSN/DSN.php +++ b/src/DSN/DSN.php @@ -71,9 +71,9 @@ public function __construct(string $dsn) /** * Return the scheme. * - * @return string + * @return ?string */ - public function getScheme(): string + public function getScheme(): ?string { return $this->scheme; }