@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $server, |
199 | 199 | $username, |
200 | 200 | $password, |
201 | - $options = [ ] |
|
201 | + $options = [] |
|
202 | 202 | ) { |
203 | 203 | $this->setClient(ExchangeWebServices::fromUsernameAndPassword( |
204 | 204 | $server, |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | )); |
209 | 209 | } |
210 | 210 | |
211 | - public static function withUsernameAndPassword($server, $username, $password, $options = [ ]) |
|
211 | + public static function withUsernameAndPassword($server, $username, $password, $options = []) |
|
212 | 212 | { |
213 | 213 | return new static(ExchangeWebServices::fromUsernameAndPassword( |
214 | 214 | $server, |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | )); |
219 | 219 | } |
220 | 220 | |
221 | - public static function withCallbackToken($server, $token, $options = [ ]) |
|
221 | + public static function withCallbackToken($server, $token, $options = []) |
|
222 | 222 | { |
223 | 223 | return new static(ExchangeWebServices::fromCallbackToken( |
224 | 224 | $server, |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | { |
579 | 579 | $result = $this->getClient()->ConvertId(array( |
580 | 580 | 'DestinationFormat' => $destinationType, |
581 | - 'SourceIds' => array ( |
|
581 | + 'SourceIds' => array( |
|
582 | 582 | 'AlternateId' => array( |
583 | 583 | 'Format' => $fromType, |
584 | 584 | 'Id' => $itemId->getId(), |
@@ -17,13 +17,13 @@ |
||
17 | 17 | //Phone numbers have to be updated in the same manner |
18 | 18 | $api->updateContactItem($contact[0]->getItemId(), array( |
19 | 19 | 'GivenName' => 'Jane', |
20 | - 'EmailAddress:EmailAddress1' => array ( |
|
21 | - 'EmailAddresses' => array ( |
|
20 | + 'EmailAddress:EmailAddress1' => array( |
|
21 | + 'EmailAddresses' => array( |
|
22 | 22 | 'Entry' => array('Key' => 'EmailAddress1', '_value' => '[email protected]') |
23 | 23 | ) |
24 | 24 | ), |
25 | - 'PhoneNumber:HomePhone' => array ( |
|
26 | - 'PhoneNumbers' => array ( |
|
25 | + 'PhoneNumber:HomePhone' => array( |
|
26 | + 'PhoneNumbers' => array( |
|
27 | 27 | 'Entry' => array('Key' => 'HomePhone', '_value' => '111') |
28 | 28 | ) |
29 | 29 | ) |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | |
216 | 216 | protected function createClient($server, $auth, $options) |
217 | 217 | { |
218 | - $location = 'https://' . $this->cleanServerUrl($server) . '/EWS/Exchange.asmx'; |
|
218 | + $location = 'https://'.$this->cleanServerUrl($server).'/EWS/Exchange.asmx'; |
|
219 | 219 | |
220 | 220 | $options = array_replace_recursive([ |
221 | 221 | 'version' => self::VERSION_2007, |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | $this->soap = new NTLMSoapClient( |
229 | 229 | $location, |
230 | 230 | $auth, |
231 | - dirname(__FILE__) . '/../../Resources/wsdl/services.wsdl', |
|
231 | + dirname(__FILE__).'/../../Resources/wsdl/services.wsdl', |
|
232 | 232 | $options |
233 | 233 | ); |
234 | 234 | |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | |
298 | 298 | $server = $url['host']; |
299 | 299 | if (isset($url['port'])) { |
300 | - $server .= ':' . $url['port']; |
|
300 | + $server .= ':'.$url['port']; |
|
301 | 301 | } |
302 | 302 | |
303 | 303 | if (isset($url['path'])) { |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | } |
331 | 331 | |
332 | 332 | if ($code != 200) { |
333 | - throw new ExchangeException('SOAP client returned status of ' . $code, $code); |
|
333 | + throw new ExchangeException('SOAP client returned status of '.$code, $code); |
|
334 | 334 | } |
335 | 335 | |
336 | 336 | if (empty($response) || |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $args[0] = $args[0]->toXmlObject(); |
107 | 107 | } |
108 | 108 | |
109 | - $headers = array ( |
|
109 | + $headers = array( |
|
110 | 110 | $this->ewsHeaders['version'], |
111 | 111 | $this->ewsHeaders['impersonation'], |
112 | 112 | ); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $headers[] = $this->ewsHeaders['timezone']; |
116 | 116 | } |
117 | 117 | |
118 | - $headers = array_filter($headers, function ($header) { |
|
118 | + $headers = array_filter($headers, function($header) { |
|
119 | 119 | if (!($header instanceof SoapHeader)) { |
120 | 120 | return false; |
121 | 121 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | if (!empty($options['version'])) { |
151 | 151 | $this->ewsHeaders['version'] = new SoapHeader( |
152 | 152 | 'http://schemas.microsoft.com/exchange/services/2006/types', |
153 | - 'RequestServerVersion Version="' . $options['version'] . '"' |
|
153 | + 'RequestServerVersion Version="'.$options['version'].'"' |
|
154 | 154 | ); |
155 | 155 | } |
156 | 156 | |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | */ |
232 | 232 | public function __getLastRequestHeaders() |
233 | 233 | { |
234 | - return implode('n', $this->__last_request_headers) . "\n"; |
|
234 | + return implode('n', $this->__last_request_headers)."\n"; |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | /** |
@@ -7,7 +7,7 @@ |
||
7 | 7 | $contact = $api->getContacts(); |
8 | 8 | |
9 | 9 | $api->updateContactItem($contact[0]->getItemId(), array( |
10 | - 'deleteFields' => array ( |
|
10 | + 'deleteFields' => array( |
|
11 | 11 | 'GivenName', |
12 | 12 | 'PhoneNumber:HomePhone' |
13 | 13 | ) |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | { |
159 | 159 | $svbinary = base_convert($version_hex, 16, 2); |
160 | 160 | if (strlen($svbinary) == 31) { |
161 | - $svbinary = '0' . $svbinary; |
|
161 | + $svbinary = '0'.$svbinary; |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | $majorversion = base_convert(substr($svbinary, 4, 6), 2, 10); |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | protected function tryTopLevelDomain($email, $password, $username) |
305 | 305 | { |
306 | 306 | $topLevelDomain = $this->getTopLevelDomainFromEmail($email); |
307 | - $url = 'https://www.' . $topLevelDomain . self::AUTODISCOVER_PATH; |
|
307 | + $url = 'https://www.'.$topLevelDomain.self::AUTODISCOVER_PATH; |
|
308 | 308 | |
309 | 309 | return $this->doNTLMPost($url, $email, $password, $username); |
310 | 310 | } |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | protected function tryAutoDiscoverSubDomain($email, $password, $username) |
323 | 323 | { |
324 | 324 | $topLevelDomain = $this->getTopLevelDomainFromEmail($email); |
325 | - $url = 'https://autodiscover.' . $topLevelDomain . self::AUTODISCOVER_PATH; |
|
325 | + $url = 'https://autodiscover.'.$topLevelDomain.self::AUTODISCOVER_PATH; |
|
326 | 326 | |
327 | 327 | return $this->doNTLMPost($url, $email, $password, $username); |
328 | 328 | } |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | { |
342 | 342 | $topLevelDomain = $this->getTopLevelDomainFromEmail($email); |
343 | 343 | |
344 | - $url = 'http://autodiscover.' . $topLevelDomain . self::AUTODISCOVER_PATH; |
|
344 | + $url = 'http://autodiscover.'.$topLevelDomain.self::AUTODISCOVER_PATH; |
|
345 | 345 | |
346 | 346 | $client = $this->httpPlayback->getHttpClient(); |
347 | 347 | $postOptions = [ |
@@ -378,11 +378,11 @@ discard block |
||
378 | 378 | protected function trySRVRecord($email, $password, $username) |
379 | 379 | { |
380 | 380 | $topLevelDomain = $this->getTopLevelDomainFromEmail($email); |
381 | - $srvHost = '_autodiscover._tcp.' . $topLevelDomain; |
|
381 | + $srvHost = '_autodiscover._tcp.'.$topLevelDomain; |
|
382 | 382 | $lookup = dns_get_record($srvHost, DNS_SRV); |
383 | 383 | if (sizeof($lookup) > 0) { |
384 | 384 | $host = $lookup[0]['target']; |
385 | - $url = 'https://' . $host . self::AUTODISCOVER_PATH; |
|
385 | + $url = 'https://'.$host.self::AUTODISCOVER_PATH; |
|
386 | 386 | |
387 | 387 | return $this->doNTLMPost($url, $email, $password, $username); |
388 | 388 | } |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | } |
602 | 602 | $output[$t][] = $v; |
603 | 603 | } elseif ($v || $v === '0') { |
604 | - $output = (string)$v; |
|
604 | + $output = (string) $v; |
|
605 | 605 | } |
606 | 606 | } |
607 | 607 | |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | if ($node->attributes->length) { |
617 | 617 | $a = array(); |
618 | 618 | foreach ($node->attributes as $attrName => $attrNode) { |
619 | - $a[$attrName] = (string)$attrNode->value; |
|
619 | + $a[$attrName] = (string) $attrNode->value; |
|
620 | 620 | } |
621 | 621 | $output['@attributes'] = $a; |
622 | 622 | } |