@@ -87,7 +87,7 @@ |
||
| 87 | 87 | protected function getTokenSplitPattern() : string |
| 88 | 88 | { |
| 89 | 89 | $sChars = \implode('|', $this->getAllTokenSeparators()); |
| 90 | - return '~(' . $sChars . ')~'; |
|
| 90 | + return '~('.$sChars.')~'; |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | { |
| 53 | 53 | $sChars = \implode('|', $this->getAllTokenSeparators()); |
| 54 | 54 | $mimePartPattern = MimeLiteralPart::MIME_PART_PATTERN_NO_QUOTES; |
| 55 | - return '~(' . $mimePartPattern . '|\\\\.|' . $sChars . ')~'; |
|
| 55 | + return '~('.$mimePartPattern.'|\\\\.|'.$sChars.')~'; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | protected function getTokenSplitPattern() : string |
| 88 | 88 | { |
| 89 | 89 | $sChars = \implode('|', $this->getAllTokenSeparators()); |
| 90 | - return '~(' . $sChars . ')~'; |
|
| 90 | + return '~('.$sChars.')~'; |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | } elseif ($part instanceof AddressPart) { |
| 114 | 114 | return [$this->partFactory->newAddressPart($strName, $part->getEmail())]; |
| 115 | 115 | } elseif ((($part instanceof LiteralPart) && !($part instanceof CommentPart)) && $part->getValue() !== '') { |
| 116 | - $strEmail .= '"' . \preg_replace('/(["\\\])/', '\\\$1', $part->getValue()) . '"'; |
|
| 116 | + $strEmail .= '"'.\preg_replace('/(["\\\])/', '\\\$1', $part->getValue()).'"'; |
|
| 117 | 117 | } else { |
| 118 | 118 | $strEmail .= \preg_replace('/\s+/', '', $part->getValue()); |
| 119 | 119 | } |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | * @param resource $handle |
| 66 | 66 | * @return string|false the read line or false on EOF or on error. |
| 67 | 67 | */ |
| 68 | - public static function readLine($handle) : string|false |
|
| 68 | + public static function readLine($handle) : string | false |
|
| 69 | 69 | { |
| 70 | 70 | $size = 4096; |
| 71 | 71 | $ret = $line = \fgets($handle, $size); |
@@ -119,8 +119,7 @@ discard block |
||
| 119 | 119 | public function getStream() : StreamInterface |
| 120 | 120 | { |
| 121 | 121 | return ($this->messageStream === null && $this->parent !== null) ? |
| 122 | - $this->parent->getStream() : |
|
| 123 | - $this->messageStream; |
|
| 122 | + $this->parent->getStream() : $this->messageStream; |
|
| 124 | 123 | } |
| 125 | 124 | |
| 126 | 125 | /** |
@@ -132,8 +131,7 @@ discard block |
||
| 132 | 131 | public function getMessageResourceHandle() : mixed |
| 133 | 132 | { |
| 134 | 133 | return ($this->messageHandle === null && $this->parent !== null) ? |
| 135 | - $this->parent->getMessageResourceHandle() : |
|
| 136 | - $this->messageHandle; |
|
| 134 | + $this->parent->getMessageResourceHandle() : $this->messageHandle; |
|
| 137 | 135 | } |
| 138 | 136 | |
| 139 | 137 | /** |
@@ -107,8 +107,7 @@ |
||
| 107 | 107 | $part->setRawHeader( |
| 108 | 108 | HeaderConsts::CONTENT_TRANSFER_ENCODING, |
| 109 | 109 | ($contentType === 'text/plain' || $contentType === 'text/html') ? |
| 110 | - 'quoted-printable' : |
|
| 111 | - 'base64' |
|
| 110 | + 'quoted-printable' : 'base64' |
|
| 112 | 111 | ); |
| 113 | 112 | } |
| 114 | 113 | return $this; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | public function getUniqueBoundary(string $mimeType) : string |
| 48 | 48 | { |
| 49 | 49 | $type = \ltrim(\strtoupper(\preg_replace('/^(multipart\/(.{3}).*|.*)$/i', '$2-', $mimeType)), '-'); |
| 50 | - return \uniqid('----=MMP-' . $type . '-', true); |
|
| 50 | + return \uniqid('----=MMP-'.$type.'-', true); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $part->setRawHeader( |
| 60 | 60 | HeaderConsts::CONTENT_TYPE, |
| 61 | 61 | "$mimeType;\r\n\tboundary=\"" |
| 62 | - . $this->getUniqueBoundary($mimeType) . '"' |
|
| 62 | + . $this->getUniqueBoundary($mimeType).'"' |
|
| 63 | 63 | ); |
| 64 | 64 | $part->notify(); |
| 65 | 65 | return $this; |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * under |
| 119 | 119 | * @return bool|IMimePart false if a part is not found |
| 120 | 120 | */ |
| 121 | - public function getContentPartContainerFromAlternative($mimeType, IMimePart $alternativePart) : bool|IMimePart |
|
| 121 | + public function getContentPartContainerFromAlternative($mimeType, IMimePart $alternativePart) : bool | IMimePart |
|
| 122 | 122 | { |
| 123 | 123 | $part = $alternativePart->getPart(0, PartFilter::fromInlineContentType($mimeType)); |
| 124 | 124 | $contPart = null; |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | string $encoding = 'base64' |
| 308 | 308 | ) : IMessagePart { |
| 309 | 309 | if ($filename === null) { |
| 310 | - $filename = 'file' . \uniqid(); |
|
| 310 | + $filename = 'file'.\uniqid(); |
|
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | $safe = \iconv('UTF-8', 'US-ASCII//translit//ignore', $filename); |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | public function __construct(string $message, string $psrLogLevelAsErrorLevel, ErrorBag $object, ?Throwable $exception = null) |
| 59 | 59 | { |
| 60 | 60 | if (!isset($this->levelMap[$psrLogLevelAsErrorLevel])) { |
| 61 | - throw new InvalidArgumentException($psrLogLevelAsErrorLevel . ' is not a known PSR Log Level'); |
|
| 61 | + throw new InvalidArgumentException($psrLogLevelAsErrorLevel.' is not a known PSR Log Level'); |
|
| 62 | 62 | } |
| 63 | 63 | $this->message = $message; |
| 64 | 64 | $this->psrLevel = $psrLogLevelAsErrorLevel; |