From 3700a58fe8aeadbd7194811c505136d227d656ce Mon Sep 17 00:00:00 2001 From: Nikola Jovanovic <62754661+nikola-jovanovic-php@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:41:50 +0100 Subject: [PATCH] fix implicitly marking as nullable (#2) --- src/Gaufrette/Adapter/AzureBlobStorage.php | 12 ++++++------ src/Gaufrette/Exception/FileAlreadyExists.php | 2 +- src/Gaufrette/Exception/FileNotFound.php | 2 +- src/Gaufrette/Exception/UnexpectedFile.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Gaufrette/Adapter/AzureBlobStorage.php b/src/Gaufrette/Adapter/AzureBlobStorage.php index c153f9c01..632e86dc3 100644 --- a/src/Gaufrette/Adapter/AzureBlobStorage.php +++ b/src/Gaufrette/Adapter/AzureBlobStorage.php @@ -97,12 +97,12 @@ public function setCreateContainerOptions(CreateContainerOptions $options) /** * Creates a new container. * - * @param string $containerName - * @param \MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions $options + * @param string $containerName + * @param \MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions|null $options * * @throws \RuntimeException if cannot create the container */ - public function createContainer($containerName, CreateContainerOptions $options = null) + public function createContainer($containerName, ?CreateContainerOptions $options = null) { $this->init(); @@ -129,12 +129,12 @@ public function createContainer($containerName, CreateContainerOptions $options /** * Deletes a container. * - * @param string $containerName - * @param BlobServiceOptions $options + * @param string $containerName + * @param BlobServiceOptions|null $options * * @throws \RuntimeException if cannot delete the container */ - public function deleteContainer($containerName, BlobServiceOptions $options = null) + public function deleteContainer($containerName, ?BlobServiceOptions $options = null) { $this->init(); diff --git a/src/Gaufrette/Exception/FileAlreadyExists.php b/src/Gaufrette/Exception/FileAlreadyExists.php index b58b5337b..190cebb6a 100644 --- a/src/Gaufrette/Exception/FileAlreadyExists.php +++ b/src/Gaufrette/Exception/FileAlreadyExists.php @@ -13,7 +13,7 @@ class FileAlreadyExists extends \RuntimeException implements Exception { private $key; - public function __construct($key, $code = 0, \Exception $previous = null) + public function __construct($key, $code = 0, ?\Exception $previous = null) { $this->key = $key; diff --git a/src/Gaufrette/Exception/FileNotFound.php b/src/Gaufrette/Exception/FileNotFound.php index 840ab9971..b6f6b2158 100644 --- a/src/Gaufrette/Exception/FileNotFound.php +++ b/src/Gaufrette/Exception/FileNotFound.php @@ -13,7 +13,7 @@ class FileNotFound extends \RuntimeException implements Exception { private $key; - public function __construct($key, $code = 0, \Exception $previous = null) + public function __construct($key, $code = 0, ?\Exception $previous = null) { $this->key = $key; diff --git a/src/Gaufrette/Exception/UnexpectedFile.php b/src/Gaufrette/Exception/UnexpectedFile.php index 38749c2fe..9744e7497 100644 --- a/src/Gaufrette/Exception/UnexpectedFile.php +++ b/src/Gaufrette/Exception/UnexpectedFile.php @@ -13,7 +13,7 @@ class UnexpectedFile extends \RuntimeException implements Exception { private $key; - public function __construct($key, $code = 0, \Exception $previous = null) + public function __construct($key, $code = 0, ?\Exception $previous = null) { $this->key = $key;