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\Protocol\Parser\ListResponseParser;
|
||||
use KTXM\ProviderImap\Client\Protocol\Parser\StatusResponseParser;
|
||||
use Generator;
|
||||
@@ -66,8 +67,8 @@ final class ListCommand implements CommandInterface
|
||||
|
||||
$command .= sprintf(
|
||||
' %s %s',
|
||||
$this->quote($this->reference),
|
||||
$this->quote($this->pattern),
|
||||
StringEncoder::quote($this->reference),
|
||||
StringEncoder::quote($this->pattern),
|
||||
);
|
||||
|
||||
$returnOptions = $this->returnOptions->toCommand();
|
||||
@@ -158,9 +159,4 @@ final class ListCommand implements CommandInterface
|
||||
$mailbox->readOnly(),
|
||||
);
|
||||
}
|
||||
|
||||
private function quote(string $value): string
|
||||
{
|
||||
return '"' . addcslashes($value, "\\\"") . '"';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user