refactor: CommandStatusResult

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-09-25 12:06:46 -04:00
parent 3ea76f34fb
commit 1ce2013c07
13 changed files with 163 additions and 76 deletions
+4 -4
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace KTXM\ProviderImap\Client\Protocol\Command;
use KTXM\ProviderImap\Client\Result\CommandStatusResult;
use KTXM\ProviderImap\Client\Result\CommandCompletion;
use KTXM\ProviderImap\Client\Protocol\Command\Argument\MessageTarget;
use KTXM\ProviderImap\Client\Protocol\IdentifierMode;
use KTXM\ProviderImap\Client\ImapException;
@@ -16,7 +16,7 @@ use KTXM\ProviderImap\Client\Protocol\SessionContext;
use KTXM\ProviderImap\Client\Protocol\SessionState;
/**
* @implements CommandInterface<CommandStatusResult>
* @implements CommandInterface<CommandCompletion>
*/
final class StoreCommand implements CommandInterface
{
@@ -82,7 +82,7 @@ final class StoreCommand implements CommandInterface
));
}
public function handle(ResponseStream $responses, SessionContext $context): CommandStatusResult
public function handle(ResponseStream $responses, SessionContext $context): CommandCompletion
{
if ($context->selectedMailbox() === null) {
throw new ImapException('STORE requires a selected mailbox.');
@@ -94,7 +94,7 @@ final class StoreCommand implements CommandInterface
throw new ImapException('STORE failed: ' . $response->text());
}
return new CommandStatusResult($response->status(), $response->text());
return new CommandCompletion($response->status(), $response->text());
}
}