@@ -100,9 +100,9 @@ |
||
100 | 100 | foreach ($parts as $part) { |
101 | 101 | // order is important here - CommentPart extends LiteralPart |
102 | 102 | if ($part instanceof CommentPart) { |
103 | - $comment .= '(' . $part->getComment() . ')'; |
|
103 | + $comment .= '('.$part->getComment().')'; |
|
104 | 104 | } elseif ($part instanceof LiteralPart) { |
105 | - $comment .= '"' . \str_replace('(["\\])', '\$1', $part->getValue()) . '"'; |
|
105 | + $comment .= '"'.\str_replace('(["\\])', '\$1', $part->getValue()).'"'; |
|
106 | 106 | } else { |
107 | 107 | $comment .= $part->getValue(); |
108 | 108 | } |
@@ -89,6 +89,6 @@ |
||
89 | 89 | protected function getTokenSplitPattern() : string |
90 | 90 | { |
91 | 91 | $sChars = \implode('|', $this->getAllTokenSeparators()); |
92 | - return '~(' . $sChars . ')~'; |
|
92 | + return '~('.$sChars.')~'; |
|
93 | 93 | } |
94 | 94 | } |
@@ -78,7 +78,7 @@ |
||
78 | 78 | foreach ($parts as $p) { |
79 | 79 | $val = $p->getValue(); |
80 | 80 | if ((($p instanceof LiteralPart) && !($p instanceof CommentPart)) && $val !== '') { |
81 | - $val = '"' . \preg_replace('/(["\\\])/', '\\\$1', $val) . '"'; |
|
81 | + $val = '"'.\preg_replace('/(["\\\])/', '\\\$1', $val).'"'; |
|
82 | 82 | } else { |
83 | 83 | $val = \preg_replace('/\s+/', '', $val); |
84 | 84 | } |
@@ -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 | /** |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @param HeaderPart[] $parts |
86 | 86 | * @param HeaderPart[] $retParts |
87 | 87 | */ |
88 | - private function addSpaceToRetParts(array $parts, array &$retParts, int $curIndex, HeaderPart &$spacePart, HeaderPart $lastPart) : void |
|
88 | + private function addSpaceToRetParts(array $parts, array &$retParts, int $curIndex, HeaderPart & $spacePart, HeaderPart $lastPart) : void |
|
89 | 89 | { |
90 | 90 | $nextPart = $parts[$curIndex]; |
91 | 91 | if ($this->shouldAddSpace($nextPart, $lastPart)) { |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * @param HeaderPart[] $retParts |
106 | 106 | * @param HeaderPart $spacePart |
107 | 107 | */ |
108 | - private function addSpaces(array $parts, array &$retParts, int $curIndex, ?HeaderPart &$spacePart = null) : void |
|
108 | + private function addSpaces(array $parts, array &$retParts, int $curIndex, ?HeaderPart & $spacePart = null) : void |
|
109 | 109 | { |
110 | 110 | $lastPart = \end($retParts); |
111 | 111 | if ($spacePart !== null && $curIndex < \count($parts) && $parts[$curIndex]->getValue() !== '' && $lastPart !== false) { |
@@ -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 | /** |