From 901b04419b79c1b5452bd6f4bd7330e6fff85ae2 Mon Sep 17 00:00:00 2001 From: Shigeki Tanaka Date: Thu, 14 Dec 2023 18:26:00 +0900 Subject: [PATCH] [fix] miss.... --- src/Contracts/ResponseFactoryInterface.php | 2 +- src/Contracts/SesameInterface.php | 2 +- src/Contracts/SesamiResponseInterface.php | 2 +- src/ResponseFactory.php | 6 +++--- src/Sesame.php | 4 ++-- src/SesamiResponse.php | 4 ++-- tests/SesameStatusTest.php | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Contracts/ResponseFactoryInterface.php b/src/Contracts/ResponseFactoryInterface.php index 0c9350d..d880a73 100644 --- a/src/Contracts/ResponseFactoryInterface.php +++ b/src/Contracts/ResponseFactoryInterface.php @@ -8,5 +8,5 @@ interface ResponseFactoryInterface { - public function create(PsrResponseInterface $response): SesamiResponseInterface; + public function create(PsrResponseInterface $response): SesameResponseInterface; } diff --git a/src/Contracts/SesameInterface.php b/src/Contracts/SesameInterface.php index 1c1f1a7..cccd993 100644 --- a/src/Contracts/SesameInterface.php +++ b/src/Contracts/SesameInterface.php @@ -9,5 +9,5 @@ interface SesameInterface { /** @throws SesameException */ - public function __invoke(string $uuid, ActionInterface $action): SesamiResponseInterface; + public function __invoke(string $uuid, ActionInterface $action): SesameResponseInterface; } diff --git a/src/Contracts/SesamiResponseInterface.php b/src/Contracts/SesamiResponseInterface.php index 8365e1a..41bfe8a 100644 --- a/src/Contracts/SesamiResponseInterface.php +++ b/src/Contracts/SesamiResponseInterface.php @@ -4,7 +4,7 @@ namespace Chanshige\SmartLock\Contracts; -interface SesamiResponseInterface +interface SesameResponseInterface { /** @return array */ public function headers(): array; diff --git a/src/ResponseFactory.php b/src/ResponseFactory.php index 2a3ab16..55b0aa4 100644 --- a/src/ResponseFactory.php +++ b/src/ResponseFactory.php @@ -5,13 +5,13 @@ namespace Chanshige\SmartLock; use Chanshige\SmartLock\Contracts\ResponseFactoryInterface; -use Chanshige\SmartLock\Contracts\SesamiResponseInterface; +use Chanshige\SmartLock\Contracts\SesameResponseInterface; use Psr\Http\Message\ResponseInterface as PsrResponseInterface; class ResponseFactory implements ResponseFactoryInterface { - public function create(PsrResponseInterface $response): SesamiResponseInterface + public function create(PsrResponseInterface $response): SesameResponseInterface { - return new SesamiResponse($response); + return new SesameResponse($response); } } diff --git a/src/Sesame.php b/src/Sesame.php index 7429868..56cfd14 100644 --- a/src/Sesame.php +++ b/src/Sesame.php @@ -9,7 +9,7 @@ use Chanshige\SmartLock\Contracts\ClientInterface; use Chanshige\SmartLock\Contracts\ResponseFactoryInterface; use Chanshige\SmartLock\Contracts\SesameInterface; -use Chanshige\SmartLock\Contracts\SesamiResponseInterface; +use Chanshige\SmartLock\Contracts\SesameResponseInterface; use Chanshige\SmartLock\Exception\ClientException; use Chanshige\SmartLock\Exception\SesameException; @@ -23,7 +23,7 @@ public function __construct( ) { } - public function __invoke(string $uuid, ActionInterface $action): SesamiResponseInterface + public function __invoke(string $uuid, ActionInterface $action): SesameResponseInterface { try { $actionUri = $this->buildUri($uuid, $action); diff --git a/src/SesamiResponse.php b/src/SesamiResponse.php index 0d248b0..2465d74 100644 --- a/src/SesamiResponse.php +++ b/src/SesamiResponse.php @@ -4,11 +4,11 @@ namespace Chanshige\SmartLock; -use Chanshige\SmartLock\Contracts\SesamiResponseInterface; +use Chanshige\SmartLock\Contracts\SesameResponseInterface; use Chanshige\SmartLock\Extend\Json; use Psr\Http\Message\ResponseInterface as PsrResponseInterface; -final readonly class SesamiResponse implements SesamiResponseInterface +final readonly class SesameResponse implements SesameResponseInterface { public function __construct( private PsrResponseInterface $response, diff --git a/tests/SesameStatusTest.php b/tests/SesameStatusTest.php index faf6dec..256578d 100644 --- a/tests/SesameStatusTest.php +++ b/tests/SesameStatusTest.php @@ -6,7 +6,7 @@ use Chanshige\SmartLock\Action\Status; use Chanshige\SmartLock\Contracts\ClientInterface; -use Chanshige\SmartLock\Contracts\SesamiResponseInterface; +use Chanshige\SmartLock\Contracts\SesameResponseInterface; use Chanshige\SmartLock\Exception\ClientException; use Chanshige\SmartLock\Exception\SesameException; use Koriym\HttpConstants\StatusCode; @@ -38,7 +38,7 @@ public function testOK(mixed $code, mixed $headers, mixed $body, mixed $formatte $sesame = new Sesame($client, new ResponseFactory()); $result = $sesame('488ABAAB-164F-7A86-595F-DDD778CB86C3', new Status()); - $this->assertInstanceOf(SesamiResponseInterface::class, $result); + $this->assertInstanceOf(SesameResponseInterface::class, $result); $this->assertSame($code, $result->statusCode()); $this->assertSame($headers, $result->headers()); $this->assertSame($body, $result->body());