generated from Nodarx/template
refactor: CommandStatusResult
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user