@@ -63,6 +63,6 @@ |
||
63 | 63 | protected function getTokenSplitPattern() |
64 | 64 | { |
65 | 65 | $sChars = implode('|', $this->getAllTokenSeparators()); |
66 | - return '~(' . $sChars . ')~'; |
|
66 | + return '~('.$sChars.')~'; |
|
67 | 67 | } |
68 | 68 | } |
@@ -158,8 +158,8 @@ |
||
158 | 158 | ksort($parts); |
159 | 159 | return array_reduce( |
160 | 160 | $parts, |
161 | - function ($carry, $item) { |
|
162 | - return $carry . $item; |
|
161 | + function($carry, $item) { |
|
162 | + return $carry.$item; |
|
163 | 163 | }, |
164 | 164 | '' |
165 | 165 | ); |
@@ -88,7 +88,7 @@ |
||
88 | 88 | protected function getTokenSplitPattern() |
89 | 89 | { |
90 | 90 | $sChars = implode('|', $this->getAllTokenSeparators()); |
91 | - return '~(' . $sChars . ')~'; |
|
91 | + return '~('.$sChars.')~'; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | $strValue = $ehloName; |
111 | 111 | if ($commentPart !== null && $this->matchHostPart($commentPart->getComment(), $hostname, $address)) { |
112 | - $strValue .= ' (' . $commentPart->getComment() . ')'; |
|
112 | + $strValue .= ' ('.$commentPart->getComment().')'; |
|
113 | 113 | $commentPart = null; |
114 | 114 | } |
115 | 115 | |
@@ -120,6 +120,6 @@ discard block |
||
120 | 120 | $hostname, |
121 | 121 | $address |
122 | 122 | ); |
123 | - return array_filter([ $domainPart, $commentPart ]); |
|
123 | + return array_filter([$domainPart, $commentPart]); |
|
124 | 124 | } |
125 | 125 | } |
@@ -96,7 +96,7 @@ |
||
96 | 96 | */ |
97 | 97 | protected function processParts(array $parts) |
98 | 98 | { |
99 | - return array_values(array_filter($parts, function ($part) { |
|
99 | + return array_values(array_filter($parts, function($part) { |
|
100 | 100 | if (empty($part) || $part instanceof CommentPart) { |
101 | 101 | return false; |
102 | 102 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | { |
47 | 47 | $sChars = implode('|', $this->getAllTokenSeparators()); |
48 | 48 | $mimePartPattern = MimeLiteralPart::MIME_PART_PATTERN_NO_QUOTES; |
49 | - return '~(' . $mimePartPattern . '|\\\\.|' . $sChars . ')~'; |
|
49 | + return '~('.$mimePartPattern.'|\\\\.|'.$sChars.')~'; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -82,7 +82,7 @@ |
||
82 | 82 | * @param int $index |
83 | 83 | * @param boolean $isEncoded |
84 | 84 | * @return SplitParameterToken |
85 | - */ |
|
85 | + */ |
|
86 | 86 | private function addToSplitPart(ArrayObject $splitParts, $name, $value, $index, $isEncoded) |
87 | 87 | { |
88 | 88 | $ret = null; |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $dateToken = preg_replace('# ([0-9]{4})$#', ' +$1', $dateToken); |
43 | 43 | // @see https://bugs.php.net/bug.php?id=42486 |
44 | 44 | } elseif (preg_match('#UT$#', $dateToken)) { |
45 | - $dateToken = $dateToken . 'C'; |
|
45 | + $dateToken = $dateToken.'C'; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | try { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $s = $this->headerFactory->getNormalizedHeaderName($name); |
90 | 90 | if (isset($this->headerMap[$s])) { |
91 | 91 | $self = $this; |
92 | - $filtered = array_filter($this->headerMap[$s], function ($h) use ($name, $self) { |
|
92 | + $filtered = array_filter($this->headerMap[$s], function($h) use ($name, $self) { |
|
93 | 93 | return (strcasecmp($self->headers[$h][0], $name) === 0); |
94 | 94 | }); |
95 | 95 | return (!empty($filtered)) ? $filtered : $this->headerMap[$s]; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $a = $this->getAllWithOriginalHeaderNameIfSet($name); |
129 | 129 | if (!empty($a)) { |
130 | 130 | $self = $this; |
131 | - return array_map(function ($index) use ($self) { |
|
131 | + return array_map(function($index) use ($self) { |
|
132 | 132 | return $self->getByIndex($index); |
133 | 133 | }, $a); |
134 | 134 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | public function add($name, $value) |
208 | 208 | { |
209 | 209 | $s = $this->headerFactory->getNormalizedHeaderName($name); |
210 | - $this->headers[$this->nextIndex] = [ $name, $value ]; |
|
210 | + $this->headers[$this->nextIndex] = [$name, $value]; |
|
211 | 211 | $this->headerObjects[$this->nextIndex] = null; |
212 | 212 | if (!isset($this->headerMap[$s])) { |
213 | 213 | $this->headerMap[$s] = []; |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | return; |
236 | 236 | } |
237 | 237 | $i = $this->headerMap[$s][$offset]; |
238 | - $this->headers[$i] = [ $name, $value ]; |
|
238 | + $this->headers[$i] = [$name, $value]; |
|
239 | 239 | $this->headerObjects[$i] = null; |
240 | 240 | } |
241 | 241 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | */ |
248 | 248 | public function getHeaderObjects() |
249 | 249 | { |
250 | - return array_filter(array_map([ $this, 'getByIndex' ], array_keys($this->headers))); |
|
250 | + return array_filter(array_map([$this, 'getByIndex'], array_keys($this->headers))); |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $this->addRawHeaderToPart($header, $container); |
49 | 49 | $header = ''; |
50 | 50 | } else { |
51 | - $line = "\r\n" . $line; |
|
51 | + $line = "\r\n".$line; |
|
52 | 52 | } |
53 | 53 | $header .= rtrim($line, "\r\n"); |
54 | 54 | } while ($header !== ''); |