generated from Nodarx/template
refactor: unify quotes encoding
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace KTXM\ProviderImap\Client\Protocol\Command;
|
||||
|
||||
use KTXM\ProviderImap\Client\Protocol\StringEncoder;
|
||||
use KTXM\ProviderImap\Client\ImapException;
|
||||
use KTXM\ProviderImap\Client\Protocol\RequestFrame;
|
||||
use KTXM\ProviderImap\Client\Protocol\Response\ContinuationResponse;
|
||||
@@ -57,7 +58,7 @@ final class AppendCommand implements CommandInterface
|
||||
|
||||
return new RequestFrame(sprintf(
|
||||
'APPEND %s %s{%d}',
|
||||
$this->quote($this->mailbox),
|
||||
StringEncoder::quote($this->mailbox),
|
||||
$flagSegment,
|
||||
strlen($this->literal),
|
||||
));
|
||||
@@ -86,10 +87,6 @@ final class AppendCommand implements CommandInterface
|
||||
throw new ImapException('APPEND did not receive a tagged completion response.');
|
||||
}
|
||||
|
||||
private function quote(string $mailbox): string
|
||||
{
|
||||
return '"' . addcslashes($mailbox, "\\\"") . '"';
|
||||
}
|
||||
|
||||
private function parseAppendUid(string $text): ?int
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user