@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | $phraseStr = $string; |
215 | 215 | |
216 | 216 | // If it's not valid |
217 | - if (!preg_match('/^' . self::PHRASE_PATTERN . '$/D', $phraseStr)) { |
|
217 | + if (!preg_match('/^'.self::PHRASE_PATTERN.'$/D', $phraseStr)) { |
|
218 | 218 | |
219 | 219 | if (preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $phraseStr)) { |
220 | 220 | // .. but it is just ascii text, try escaping some characters |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | |
227 | 227 | // and make it a quoted-string |
228 | - $phraseStr = '"' . $phraseStr . '"'; |
|
228 | + $phraseStr = '"'.$phraseStr.'"'; |
|
229 | 229 | } |
230 | 230 | |
231 | 231 | return $phraseStr; |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | protected function escapeSpecials($token, array $include = array()) |
243 | 243 | { |
244 | 244 | foreach (array_merge(array('\\'), $include) as $char) { |
245 | - $token = str_replace($char, '\\' . $char, $token); |
|
245 | + $token = str_replace($char, '\\'.$char, $token); |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | return $token; |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $token = substr($token, 1); |
275 | 275 | } |
276 | 276 | |
277 | - $usedLength = strlen($header->getFieldName() . ': ') + strlen($value); |
|
277 | + $usedLength = strlen($header->getFieldName().': ') + strlen($value); |
|
278 | 278 | $value .= $this->getTokenAsEncodedWord($token, $usedLength); |
279 | 279 | |
280 | 280 | $header->setMaxLineLength(74); // Forcefully override (we need to save two chars for quoting) |
@@ -349,10 +349,10 @@ discard block |
||
349 | 349 | $charsetDecl = $this->_charset; |
350 | 350 | |
351 | 351 | if (isset($this->_lang)) { |
352 | - $charsetDecl .= '*' . $this->_lang; |
|
352 | + $charsetDecl .= '*'.$this->_lang; |
|
353 | 353 | } |
354 | 354 | |
355 | - $encodingWrapperLength = strlen('=?' . $charsetDecl . '?' . $this->_encoder->getName() . '??='); |
|
355 | + $encodingWrapperLength = strlen('=?'.$charsetDecl.'?'.$this->_encoder->getName().'??='); |
|
356 | 356 | |
357 | 357 | if ($firstLineOffset >= 75) { |
358 | 358 | // Does this logic need to be here? |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | if (Swift::strtolowerWithStaticCache($this->_charset) !== 'iso-2022-jp') { |
369 | 369 | // special encoding for iso-2022-jp using mb_encode_mimeheader |
370 | 370 | foreach ($encodedTextLines as $lineNum => $line) { |
371 | - $encodedTextLines[$lineNum] = '=?' . $charsetDecl . '?' . $this->_encoder->getName() . '?' . $line . '?='; |
|
371 | + $encodedTextLines[$lineNum] = '=?'.$charsetDecl.'?'.$this->_encoder->getName().'?'.$line.'?='; |
|
372 | 372 | } |
373 | 373 | } |
374 | 374 | |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | { |
458 | 458 | $lineCount = 0; |
459 | 459 | $headerLines = array(); |
460 | - $headerLines[] = $this->_name . ': '; |
|
460 | + $headerLines[] = $this->_name.': '; |
|
461 | 461 | $currentLine = &$headerLines[$lineCount++]; |
462 | 462 | |
463 | 463 | // Build all tokens back into compliant header |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | ( |
473 | 473 | $i > 0 |
474 | 474 | && |
475 | - strlen($currentLine . $token) > $this->_lineLength |
|
475 | + strlen($currentLine.$token) > $this->_lineLength |
|
476 | 476 | ) |
477 | 477 | ) |
478 | 478 | ) { |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | } |
488 | 488 | |
489 | 489 | // Implode with FWS (RFC 2822, 2.2.3) |
490 | - return implode("\r\n", $headerLines) . "\r\n"; |
|
490 | + return implode("\r\n", $headerLines)."\r\n"; |
|
491 | 491 | } |
492 | 492 | |
493 | 493 | /** |