@@ -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 | } |
@@ -161,7 +161,7 @@ |
||
161 | 161 | { |
162 | 162 | $sChars = \implode('|', $this->getAllTokenSeparators()); |
163 | 163 | $mimePartPattern = MimeLiteralPart::MIME_PART_PATTERN; |
164 | - return '~(' . $mimePartPattern . '|\\\\.|' . $sChars . ')~'; |
|
164 | + return '~('.$mimePartPattern.'|\\\\.|'.$sChars.')~'; |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | protected function isStartToken(string $token) : bool |
84 | 84 | { |
85 | - $pattern = '/^' . \preg_quote($this->getPartName(), '/') . '$/i'; |
|
85 | + $pattern = '/^'.\preg_quote($this->getPartName(), '/').'$/i'; |
|
86 | 86 | return (\preg_match($pattern, $token) === 1); |
87 | 87 | } |
88 | 88 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | { |
114 | 114 | return [ |
115 | 115 | '\s+', |
116 | - '(\A\s*|\s+)(?i)' . \preg_quote($this->getPartName(), '/') . '(?-i)(?=\s+)' |
|
116 | + '(\A\s*|\s+)(?i)'.\preg_quote($this->getPartName(), '/').'(?-i)(?=\s+)' |
|
117 | 117 | ]; |
118 | 118 | } |
119 | 119 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | foreach ($filtered as $part) { |
134 | 134 | if ($part instanceof CommentPart) { |
135 | 135 | $ret[] = $part; |
136 | - continue; // getValue() is empty anyway, but for clarity... |
|
136 | + continue; // getValue() is empty anyway, but for clarity... |
|
137 | 137 | } |
138 | 138 | $strValue .= $part->getValue(); |
139 | 139 | } |
@@ -105,7 +105,7 @@ |
||
105 | 105 | |
106 | 106 | $strValue = $ehloName; |
107 | 107 | if ($commentPart !== null && $this->matchHostPart($commentPart->getComment(), $hostname, $address)) { |
108 | - $strValue .= ' (' . $commentPart->getComment() . ')'; |
|
108 | + $strValue .= ' ('.$commentPart->getComment().')'; |
|
109 | 109 | $commentPart = null; |
110 | 110 | } |
111 | 111 |
@@ -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 | /** |
@@ -103,7 +103,7 @@ |
||
103 | 103 | } elseif ($tokens->valid() && !$this->isEndToken($tokens->current())) { |
104 | 104 | foreach ($this->getSubConsumers() as $consumer) { |
105 | 105 | if ($consumer->isStartToken($tokens->current())) { |
106 | - return $this; |
|
106 | + return $this; |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 | $tokens->next(); |
@@ -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 | /** |
@@ -154,7 +154,7 @@ |
||
154 | 154 | return \array_reduce( |
155 | 155 | $parts, |
156 | 156 | function($carry, $item) { |
157 | - return $carry . $item; |
|
157 | + return $carry.$item; |
|
158 | 158 | }, |
159 | 159 | '' |
160 | 160 | ); |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $dateToken = \preg_replace('# ([0-9]{4})$#', ' +$1', $dateToken); |
42 | 42 | // @see https://bugs.php.net/bug.php?id=42486 |
43 | 43 | } elseif (\preg_match('#UT$#', $dateToken)) { |
44 | - $dateToken = $dateToken . 'C'; |
|
44 | + $dateToken = $dateToken.'C'; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | try { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | public function getUniqueBoundary(string $mimeType) : string |
45 | 45 | { |
46 | 46 | $type = \ltrim(\strtoupper(\preg_replace('/^(multipart\/(.{3}).*|.*)$/i', '$2-', $mimeType)), '-'); |
47 | - return \uniqid('----=MMP-' . $type . '-', true); |
|
47 | + return \uniqid('----=MMP-'.$type.'-', true); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $part->setRawHeader( |
57 | 57 | HeaderConsts::CONTENT_TYPE, |
58 | 58 | "$mimeType;\r\n\tboundary=\"" |
59 | - . $this->getUniqueBoundary($mimeType) . '"' |
|
59 | + . $this->getUniqueBoundary($mimeType).'"' |
|
60 | 60 | ); |
61 | 61 | $part->notify(); |
62 | 62 | return $this; |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | public function createAndAddPartForAttachment(IMessage $message, $resource, string $mimeType, string $disposition, ?string $filename = null, string $encoding = 'base64') |
298 | 298 | { |
299 | 299 | if ($filename === null) { |
300 | - $filename = 'file' . \uniqid(); |
|
300 | + $filename = 'file'.\uniqid(); |
|
301 | 301 | } |
302 | 302 | |
303 | 303 | $safe = \iconv('UTF-8', 'US-ASCII//translit//ignore', $filename); |