@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | { |
| 107 | 107 | if ($lang && $this->_lang !== $lang) { |
| 108 | 108 | $this->clearCachedValue(); |
| 109 | - $this->_lang = (string)$lang; |
|
| 109 | + $this->_lang = (string) $lang; |
|
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | if ($lineLength && $this->_lineLength !== $lineLength) { |
| 166 | 166 | $this->clearCachedValue(); |
| 167 | 167 | |
| 168 | - $this->_lineLength = (int)$lineLength; |
|
| 168 | + $this->_lineLength = (int) $lineLength; |
|
| 169 | 169 | |
| 170 | 170 | return true; |
| 171 | 171 | } |
@@ -231,17 +231,17 @@ discard block |
||
| 231 | 231 | // Treat token as exactly what was given |
| 232 | 232 | $phraseStr = $string; |
| 233 | 233 | // If it's not valid |
| 234 | - if (!preg_match('/^' . self::PHRASE_PATTERN . '$/D', $phraseStr)) { |
|
| 234 | + if (!preg_match('/^'.self::PHRASE_PATTERN.'$/D', $phraseStr)) { |
|
| 235 | 235 | // .. but it is just ascii text, try escaping some characters |
| 236 | 236 | // and make it a quoted-string |
| 237 | 237 | if (preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $phraseStr)) { |
| 238 | 238 | $phraseStr = $this->escapeSpecials($phraseStr, array('"')); |
| 239 | - $phraseStr = '"' . $phraseStr . '"'; |
|
| 239 | + $phraseStr = '"'.$phraseStr.'"'; |
|
| 240 | 240 | } else { |
| 241 | 241 | // ... otherwise it needs encoding |
| 242 | 242 | // Determine space remaining on line if first line |
| 243 | 243 | if ($shorten) { |
| 244 | - $usedLength = strlen($header->getFieldName() . ': '); |
|
| 244 | + $usedLength = strlen($header->getFieldName().': '); |
|
| 245 | 245 | } else { |
| 246 | 246 | $usedLength = 0; |
| 247 | 247 | } |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | protected function escapeSpecials($token, array $include = array()) |
| 264 | 264 | { |
| 265 | 265 | foreach (array_merge(array('\\'), $include) as $char) { |
| 266 | - $token = str_replace($char, '\\' . $char, $token); |
|
| 266 | + $token = str_replace($char, '\\'.$char, $token); |
|
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | return $token; |
@@ -368,10 +368,10 @@ discard block |
||
| 368 | 368 | $charsetDecl = $this->_charset; |
| 369 | 369 | |
| 370 | 370 | if ($this->_lang) { |
| 371 | - $charsetDecl .= '*' . $this->_lang; |
|
| 371 | + $charsetDecl .= '*'.$this->_lang; |
|
| 372 | 372 | } |
| 373 | 373 | |
| 374 | - $encodingWrapperLength = strlen('=?' . $charsetDecl . '?' . $this->_encoder->getName() . '??='); |
|
| 374 | + $encodingWrapperLength = strlen('=?'.$charsetDecl.'?'.$this->_encoder->getName().'??='); |
|
| 375 | 375 | |
| 376 | 376 | if ($firstLineOffset >= 75) { |
| 377 | 377 | // Does this logic need to be here? |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | if (Swift::strtolowerWithStaticCache($this->_charset) !== 'iso-2022-jp') { |
| 388 | 388 | // special encoding for iso-2022-jp using mb_encode_mimeheader |
| 389 | 389 | foreach ($encodedTextLines as $lineNum => $line) { |
| 390 | - $encodedTextLines[$lineNum] = '=?' . $charsetDecl . '?' . $this->_encoder->getName() . '?' . $line . '?='; |
|
| 390 | + $encodedTextLines[$lineNum] = '=?'.$charsetDecl.'?'.$this->_encoder->getName().'?'.$line.'?='; |
|
| 391 | 391 | } |
| 392 | 392 | } |
| 393 | 393 | |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | { |
| 482 | 482 | $lineCount = 0; |
| 483 | 483 | $headerLines = array(); |
| 484 | - $headerLines[] = $this->_name . ': '; |
|
| 484 | + $headerLines[] = $this->_name.': '; |
|
| 485 | 485 | $currentLine = &$headerLines[$lineCount++]; |
| 486 | 486 | |
| 487 | 487 | // Build all tokens back into compliant header |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | ( |
| 497 | 497 | $i > 0 |
| 498 | 498 | && |
| 499 | - strlen($currentLine . $token) > $this->_lineLength |
|
| 499 | + strlen($currentLine.$token) > $this->_lineLength |
|
| 500 | 500 | ) |
| 501 | 501 | ) |
| 502 | 502 | ) { |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | } |
| 512 | 512 | |
| 513 | 513 | // Implode with FWS (RFC 2822, 2.2.3) |
| 514 | - return implode("\r\n", $headerLines) . "\r\n"; |
|
| 514 | + return implode("\r\n", $headerLines)."\r\n"; |
|
| 515 | 515 | } |
| 516 | 516 | |
| 517 | 517 | /** |