[snappymail] No need to call trim() twice

Mostly a cosmetic change, but stil.
This commit is contained in:
David Härdeman 2021-08-24 23:08:46 +02:00
parent 8934205ede
commit 542a1c9624

View file

@ -2083,13 +2083,13 @@ class MailClient
*/
public function FolderCreate(string $sFolderNameInUtf8, string $sFolderParentFullNameRaw = '', bool $bSubscribeOnCreation = true, string $sDelimiter = '') : self
{
if (!strlen(\trim($sFolderNameInUtf8)))
$sFolderNameInUtf8 = \trim($sFolderNameInUtf8);
if (0 === \strlen($sFolderNameInUtf8))
{
throw new \MailSo\Base\Exceptions\InvalidArgumentException;
}
$sFolderNameInUtf8 = \trim($sFolderNameInUtf8);
if (0 === \strlen($sDelimiter) || 0 < \strlen(\trim($sFolderParentFullNameRaw)))
{
$aFolders = $this->oImapClient->FolderList('', 0 === \strlen(\trim($sFolderParentFullNameRaw)) ? 'INBOX' : $sFolderParentFullNameRaw);