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,7 +4,10 @@ declare(strict_types=1);
namespace KTXM\ProviderImap\Client\Result;
final class CommandStatusResult
/**
* Successful command output; unsuccessful completion is reported by exception.
*/
final class CommandCompletion
{
public function __construct(
private readonly string $status,
@@ -20,9 +23,4 @@ final class CommandStatusResult
{
return $this->text;
}
public function isOk(): bool
{
return $this->status === 'OK';
}
}
+3 -5
View File
@@ -4,6 +4,9 @@ declare(strict_types=1);
namespace KTXM\ProviderImap\Client\Result;
/**
* Successful command output; unsuccessful completion is reported by exception.
*/
final class MessageTransferResult
{
/**
@@ -33,11 +36,6 @@ final class MessageTransferResult
return $this->text;
}
public function isOk(): bool
{
return $this->status === 'OK';
}
/**
* @return list<array{source:string, name:string, arguments:list<string>, text:string}>
*/