@@ -30,6 +30,6 @@ |
||
30 | 30 | */ |
31 | 31 | public function isValidSimpleWrapper($email) |
32 | 32 | { |
33 | - return (boolean)preg_match('/^(.*<?)(.*)@(.*)(>?)$/', $email); |
|
33 | + return (boolean) preg_match('/^(.*<?)(.*)@(.*)(>?)$/', $email); |
|
34 | 34 | } |
35 | 35 | } |
@@ -77,9 +77,9 @@ |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | $count = ( |
80 | - count((array)$message->getTo()) |
|
81 | - + count((array)$message->getCc()) |
|
82 | - + count((array)$message->getBcc()) |
|
80 | + count((array) $message->getTo()) |
|
81 | + + count((array) $message->getCc()) |
|
82 | + + count((array) $message->getBcc()) |
|
83 | 83 | ); |
84 | 84 | |
85 | 85 | return $count; |
@@ -111,7 +111,7 @@ |
||
111 | 111 | if ($i !== null) { |
112 | 112 | $tree[-1] = min(count($replace) - 1, $i); |
113 | 113 | $tree[-2] = $last_size; |
114 | - $this->_treeMaxLen = (int)$size; |
|
114 | + $this->_treeMaxLen = (int) $size; |
|
115 | 115 | } |
116 | 116 | foreach ($replace as $rep) { |
117 | 117 | if (!is_array($rep)) { |
@@ -8,17 +8,17 @@ |
||
8 | 8 | * file that was distributed with this source code. |
9 | 9 | */ |
10 | 10 | |
11 | -require __DIR__ . '/classes/Swift.php'; |
|
11 | +require __DIR__.'/classes/Swift.php'; |
|
12 | 12 | |
13 | 13 | Swift::registerAutoload( |
14 | - function () { |
|
14 | + function() { |
|
15 | 15 | // Load in dependency maps |
16 | - require __DIR__ . '/dependency_maps/cache_deps.php'; |
|
17 | - require __DIR__ . '/dependency_maps/mime_deps.php'; |
|
18 | - require __DIR__ . '/dependency_maps/message_deps.php'; |
|
19 | - require __DIR__ . '/dependency_maps/transport_deps.php'; |
|
16 | + require __DIR__.'/dependency_maps/cache_deps.php'; |
|
17 | + require __DIR__.'/dependency_maps/mime_deps.php'; |
|
18 | + require __DIR__.'/dependency_maps/message_deps.php'; |
|
19 | + require __DIR__.'/dependency_maps/transport_deps.php'; |
|
20 | 20 | |
21 | 21 | // Load in global library preferences |
22 | - require __DIR__ . '/preferences.php'; |
|
22 | + require __DIR__.'/preferences.php'; |
|
23 | 23 | } |
24 | 24 | ); |
@@ -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') |
@@ -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 |