From 40836c272e273c7727ff380ef13926187bb43e30 Mon Sep 17 00:00:00 2001 From: y-abderrazik Date: Tue, 27 Jun 2023 10:55:45 +0100 Subject: [PATCH] update UnsetPrivateKeyException and UnsetPublicKeyException --- src/API/Endpoints/Endpoint.php | 4 ++-- src/API/Exceptions/Keys/UnsetPrivateKeyException.php | 3 --- src/API/Exceptions/Keys/UnsetPublicKeyException.php | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/API/Endpoints/Endpoint.php b/src/API/Endpoints/Endpoint.php index d348a44..5d4d002 100644 --- a/src/API/Endpoints/Endpoint.php +++ b/src/API/Endpoints/Endpoint.php @@ -37,14 +37,14 @@ protected function createEndpoint(): string protected function assertPrivateKeyIsSet(): void { if ($this->apiService->getPrivateKey() === null) { - throw new UnsetPrivateKeyException(); + throw new UnsetPrivateKeyException("private key not set"); } } protected function assertPublicKeyIsSet(): void { if ($this->apiService->getPublicKey() === null) { - throw new UnsetPublicKeyException(); + throw new UnsetPublicKeyException("public key not set"); } } } diff --git a/src/API/Exceptions/Keys/UnsetPrivateKeyException.php b/src/API/Exceptions/Keys/UnsetPrivateKeyException.php index ce9f5aa..c23efe6 100644 --- a/src/API/Exceptions/Keys/UnsetPrivateKeyException.php +++ b/src/API/Exceptions/Keys/UnsetPrivateKeyException.php @@ -6,7 +6,4 @@ class UnsetPrivateKeyException extends ValidationException { - public function __construct() { - parent::__construct("private key not set"); - } } diff --git a/src/API/Exceptions/Keys/UnsetPublicKeyException.php b/src/API/Exceptions/Keys/UnsetPublicKeyException.php index d11a174..213e16e 100644 --- a/src/API/Exceptions/Keys/UnsetPublicKeyException.php +++ b/src/API/Exceptions/Keys/UnsetPublicKeyException.php @@ -6,7 +6,4 @@ class UnsetPublicKeyException extends ValidationException { - public function __construct() { - parent::__construct("public key not set"); - } }