@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -require __DIR__ . '/../mime_types.php'; |
|
| 3 | +require __DIR__.'/../mime_types.php'; |
|
| 4 | 4 | |
| 5 | 5 | Swift_DependencyContainer::getInstance() |
| 6 | 6 | ->register('properties.charset') |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | foreach ($this->_params as $name => $value) { |
| 133 | 133 | if (null !== $value) { |
| 134 | 134 | // Add the parameter |
| 135 | - $body .= '; ' . $this->_createParameter($name, $value); |
|
| 135 | + $body .= '; '.$this->_createParameter($name, $value); |
|
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | 138 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | $tokens[count($tokens) - 1] .= ';'; |
| 161 | 161 | $tokens = array_merge( |
| 162 | 162 | $tokens, |
| 163 | - $this->generateTokenLines(' ' . $this->_createParameter($name, $value)) |
|
| 163 | + $this->generateTokenLines(' '.$this->_createParameter($name, $value)) |
|
| 164 | 164 | ); |
| 165 | 165 | } |
| 166 | 166 | } |
@@ -182,18 +182,18 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | $encoded = false; |
| 184 | 184 | // Allow room for parameter name, indices, "=" and DQUOTEs |
| 185 | - $maxValueLength = $this->getMaxLineLength() - strlen($name . '=*N"";') - 1; |
|
| 185 | + $maxValueLength = $this->getMaxLineLength() - strlen($name.'=*N"";') - 1; |
|
| 186 | 186 | $firstLineOffset = 0; |
| 187 | 187 | |
| 188 | 188 | // If it's not already a valid parameter value... |
| 189 | - if (!preg_match('/^' . self::TOKEN_REGEX . '$/D', $value)) { |
|
| 189 | + if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) { |
|
| 190 | 190 | // TODO: text, or something else?? |
| 191 | 191 | // ... and it's not ascii |
| 192 | 192 | if (!preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $value)) { |
| 193 | 193 | $encoded = true; |
| 194 | 194 | // Allow space for the indices, charset and language |
| 195 | - $maxValueLength = $this->getMaxLineLength() - strlen($name . '*N*="";') - 1; |
|
| 196 | - $firstLineOffset = strlen($this->getCharset() . "'" . $this->getLanguage() . "'"); |
|
| 195 | + $maxValueLength = $this->getMaxLineLength() - strlen($name.'*N*="";') - 1; |
|
| 196 | + $firstLineOffset = strlen($this->getCharset()."'".$this->getLanguage()."'"); |
|
| 197 | 197 | } |
| 198 | 198 | } |
| 199 | 199 | |
@@ -219,12 +219,12 @@ discard block |
||
| 219 | 219 | if (count($valueLines) > 1) { |
| 220 | 220 | $paramLines = array(); |
| 221 | 221 | foreach ($valueLines as $i => $line) { |
| 222 | - $paramLines[] = $name . '*' . $i . $this->_getEndOfParameterValue($line, true, $i === 0); |
|
| 222 | + $paramLines[] = $name.'*'.$i.$this->_getEndOfParameterValue($line, true, $i === 0); |
|
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | return implode(";\r\n ", $paramLines); |
| 226 | 226 | } else { |
| 227 | - return $name . $this->_getEndOfParameterValue( |
|
| 227 | + return $name.$this->_getEndOfParameterValue( |
|
| 228 | 228 | $valueLines[0], |
| 229 | 229 | $encoded, |
| 230 | 230 | true |
@@ -243,18 +243,18 @@ discard block |
||
| 243 | 243 | */ |
| 244 | 244 | private function _getEndOfParameterValue($value, $encoded = false, $firstLine = false) |
| 245 | 245 | { |
| 246 | - if (!preg_match('/^' . self::TOKEN_REGEX . '$/D', $value)) { |
|
| 247 | - $value = '"' . $value . '"'; |
|
| 246 | + if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) { |
|
| 247 | + $value = '"'.$value.'"'; |
|
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | $prepend = '='; |
| 251 | 251 | if ($encoded) { |
| 252 | 252 | $prepend = '*='; |
| 253 | 253 | if ($firstLine) { |
| 254 | - $prepend = '*=' . $this->getCharset() . "'" . $this->getLanguage() . "'"; |
|
| 254 | + $prepend = '*='.$this->getCharset()."'".$this->getLanguage()."'"; |
|
| 255 | 255 | } |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | - return $prepend . $value; |
|
| 258 | + return $prepend.$value; |
|
| 259 | 259 | } |
| 260 | 260 | } |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | */ |
| 114 | 114 | public function toString() |
| 115 | 115 | { |
| 116 | - return $this->_fieldName . ': ' . $this->_value; |
|
| 116 | + return $this->_fieldName.': '.$this->_value; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $angleAddrs = array(); |
| 157 | 157 | |
| 158 | 158 | foreach ($this->_ids as $id) { |
| 159 | - $angleAddrs[] = '<' . $id . '>'; |
|
| 159 | + $angleAddrs[] = '<'.$id.'>'; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | $this->setCachedValue(implode(' ', $angleAddrs)); |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | { |
| 177 | 177 | if ($this->_emailValidator->isValidSimpleWrapper($id) === false) { |
| 178 | 178 | throw new Swift_RfcComplianceException( |
| 179 | - 'Invalid ID given <' . $id . '>' |
|
| 179 | + 'Invalid ID given <'.$id.'>' |
|
| 180 | 180 | ); |
| 181 | 181 | } |
| 182 | 182 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | public function setNameAddresses($mailboxes) |
| 111 | 111 | { |
| 112 | - $this->_mailboxes = $this->normalizeMailboxes((array)$mailboxes); |
|
| 112 | + $this->_mailboxes = $this->normalizeMailboxes((array) $mailboxes); |
|
| 113 | 113 | $this->setCachedValue(null); //Clear any cached value |
| 114 | 114 | } |
| 115 | 115 | |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | */ |
| 195 | 195 | public function setAddresses($addresses) |
| 196 | 196 | { |
| 197 | - $this->setNameAddresses(array_values((array)$addresses)); |
|
| 197 | + $this->setNameAddresses(array_values((array) $addresses)); |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | /** |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | public function removeAddresses($addresses) |
| 218 | 218 | { |
| 219 | 219 | $this->setCachedValue(null); |
| 220 | - foreach ((array)$addresses as $address) { |
|
| 220 | + foreach ((array) $addresses as $address) { |
|
| 221 | 221 | unset($this->_mailboxes[$address]); |
| 222 | 222 | } |
| 223 | 223 | } |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | $mailboxStr = $email; |
| 334 | 334 | if ($name) { |
| 335 | 335 | $nameStr = $this->createDisplayNameString($name, empty($strings)); |
| 336 | - $mailboxStr = $nameStr . ' <' . $mailboxStr . '>'; |
|
| 336 | + $mailboxStr = $nameStr.' <'.$mailboxStr.'>'; |
|
| 337 | 337 | } |
| 338 | 338 | $strings[] = $mailboxStr; |
| 339 | 339 | } |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | private function _assertValidAddress($address) |
| 352 | 352 | { |
| 353 | 353 | if ($this->_emailValidator->isValidWrapper($address) === false) { |
| 354 | - throw new Swift_RfcComplianceException('Address in mailbox given [' . $address . '] does not comply with RFC 2822, 3.6.2.'); |
|
| 354 | + throw new Swift_RfcComplianceException('Address in mailbox given ['.$address.'] does not comply with RFC 2822, 3.6.2.'); |
|
| 355 | 355 | } |
| 356 | 356 | } |
| 357 | 357 | } |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | { |
| 127 | 127 | if (!$this->getCachedValue()) { |
| 128 | 128 | if (isset($this->_address)) { |
| 129 | - $this->setCachedValue('<' . $this->_address . '>'); |
|
| 129 | + $this->setCachedValue('<'.$this->_address.'>'); |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | protected function getSafeMapShareId() |
| 39 | 39 | { |
| 40 | - return get_class($this) . ($this->_dotEscape ? '.dotEscape' : ''); |
|
| 40 | + return get_class($this).($this->_dotEscape ? '.dotEscape' : ''); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | protected function initSafeMap() |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $newLineLength = $lineLen + ($i === false ? $size : $i); |
| 101 | 101 | |
| 102 | 102 | if ($currentLine && $newLineLength >= $thisLineLength) { |
| 103 | - $is->write($prepend . $this->_standardize($currentLine)); |
|
| 103 | + $is->write($prepend.$this->_standardize($currentLine)); |
|
| 104 | 104 | $currentLine = ''; |
| 105 | 105 | $prepend = "=\r\n"; |
| 106 | 106 | $thisLineLength = $maxLineLength; |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | if ($currentLine !== '') { |
| 121 | - $is->write($prepend . $this->_standardize($currentLine)); |
|
| 121 | + $is->write($prepend.$this->_standardize($currentLine)); |
|
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | if ($atEOF) { |
| 47 | 47 | $streamTheseBytes = $base64ReadBufferRemainderBytes; |
| 48 | 48 | } else { |
| 49 | - $streamTheseBytes = $base64ReadBufferRemainderBytes . $readBytes; |
|
| 49 | + $streamTheseBytes = $base64ReadBufferRemainderBytes.$readBytes; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | $base64ReadBufferRemainderBytes = null; |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset; |
| 72 | 72 | |
| 73 | 73 | while ($thisMaxLineLength < strlen($encoded)) { |
| 74 | - $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength) . "\r\n"; |
|
| 74 | + $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength)."\r\n"; |
|
| 75 | 75 | $firstLineOffset = 0; |
| 76 | 76 | $encoded = substr($encoded, $thisMaxLineLength); |
| 77 | 77 | $thisMaxLineLength = $maxLineLength; |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | { |
| 72 | 72 | $leftOver = ''; |
| 73 | 73 | while (false !== $bytes = $os->read(8192)) { |
| 74 | - $toencode = $leftOver . $bytes; |
|
| 74 | + $toencode = $leftOver.$bytes; |
|
| 75 | 75 | |
| 76 | 76 | if ($this->_canonical) { |
| 77 | 77 | $toencode = $this->_canonicalize($toencode); |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | if ( |
| 141 | 141 | $currentLine !== '' |
| 142 | 142 | && |
| 143 | - strlen($currentLine . $chunk) > $length |
|
| 143 | + strlen($currentLine.$chunk) > $length |
|
| 144 | 144 | ) { |
| 145 | 145 | $lines[] = ''; |
| 146 | 146 | $currentLine = &$lines[$lineCount++]; |