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\Result\CommandStatusResult;
|
||||
use KTXM\ProviderImap\Client\ImapException;
|
||||
use KTXM\ProviderImap\Client\Protocol\RequestFrame;
|
||||
@@ -41,8 +42,8 @@ final class RenameCommand implements CommandInterface
|
||||
|
||||
return new RequestFrame(sprintf(
|
||||
'RENAME %s %s',
|
||||
$this->quote($this->fromMailbox),
|
||||
$this->quote($this->toMailbox),
|
||||
StringEncoder::quote($this->fromMailbox),
|
||||
StringEncoder::quote($this->toMailbox),
|
||||
));
|
||||
}
|
||||
|
||||
@@ -64,9 +65,4 @@ final class RenameCommand implements CommandInterface
|
||||
|
||||
throw new ImapException('RENAME did not receive a tagged completion response.');
|
||||
}
|
||||
|
||||
private function quote(string $value): string
|
||||
{
|
||||
return '"' . addcslashes($value, "\\\"") . '"';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user