@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | * |
558 | 558 | * @param string $url URL to try posting to |
559 | 559 | * @param integer $timeout Overall cURL timeout for this request |
560 | - * @return boolean |
|
560 | + * @return null|boolean |
|
561 | 561 | */ |
562 | 562 | public function doNTLMPost($url, $timeout = 6) |
563 | 563 | { |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | * Parse the Autoresponse Payload, particularly to determine if an |
617 | 617 | * additional request is necessary. |
618 | 618 | * |
619 | - * @return mixed FALSE if response isn't XML or parsed response array |
|
619 | + * @return null|boolean FALSE if response isn't XML or parsed response array |
|
620 | 620 | */ |
621 | 621 | protected function parseAutodiscoverResponse() |
622 | 622 | { |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | * Recursive method for parsing DOM nodes. |
761 | 761 | * |
762 | 762 | * @link https://github.com/gaarf/XML-string-to-PHP-array |
763 | - * @param object $node DOMNode object |
|
763 | + * @param \DOMElement $node DOMNode object |
|
764 | 764 | * @return mixed |
765 | 765 | */ |
766 | 766 | protected function nodeToArray($node) |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | { |
289 | 289 | $svbinary = base_convert($version_hex, 16, 2); |
290 | 290 | if (strlen($svbinary) == 31) { |
291 | - $svbinary = '0'.$svbinary; |
|
291 | + $svbinary = '0' . $svbinary; |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | $majorversion = base_convert(substr($svbinary, 4, 6), 2, 10); |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | */ |
414 | 414 | public function tryTLD() |
415 | 415 | { |
416 | - $url = 'https://www.'.$this->tld . self::AUTODISCOVER_PATH; |
|
416 | + $url = 'https://www.' . $this->tld . self::AUTODISCOVER_PATH; |
|
417 | 417 | $result = $this->doNTLMPost($url, 5); |
418 | 418 | if ($result) { |
419 | 419 | return self::AUTODISCOVERED_VIA_TLD; |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | */ |
431 | 431 | public function trySubdomain() |
432 | 432 | { |
433 | - $url = 'https://autodiscover.'.$this->tld . self::AUTODISCOVER_PATH; |
|
433 | + $url = 'https://autodiscover.' . $this->tld . self::AUTODISCOVER_PATH; |
|
434 | 434 | $result = $this->doNTLMPost($url, 5); |
435 | 435 | if ($result) { |
436 | 436 | return self::AUTODISCOVERED_VIA_SUBDOMAIN; |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | public function trySubdomainUnauthenticatedGet() |
449 | 449 | { |
450 | 450 | $this->reset(); |
451 | - $url = 'http://autodiscover.'.$this->tld . self::AUTODISCOVER_PATH; |
|
451 | + $url = 'http://autodiscover.' . $this->tld . self::AUTODISCOVER_PATH; |
|
452 | 452 | $ch = curl_init(); |
453 | 453 | $opts = array( |
454 | 454 | CURLOPT_URL => $url, |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | CURLOPT_CUSTOMREQUEST => 'POST', |
571 | 571 | CURLOPT_POSTFIELDS => $this->getAutoDiscoverRequest(), |
572 | 572 | CURLOPT_RETURNTRANSFER => true, |
573 | - CURLOPT_USERPWD => $this->username.':'.$this->password, |
|
573 | + CURLOPT_USERPWD => $this->username . ':' . $this->password, |
|
574 | 574 | CURLOPT_TIMEOUT => $timeout, |
575 | 575 | CURLOPT_CONNECTTIMEOUT => $this->connection_timeout, |
576 | 576 | CURLOPT_FOLLOWLOCATION => true, |
@@ -584,11 +584,11 @@ discard block |
||
584 | 584 | // Set the appropriate content-type. |
585 | 585 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml; charset=utf-8')); |
586 | 586 | |
587 | - if (! empty($this->cainfo)) { |
|
587 | + if (!empty($this->cainfo)) { |
|
588 | 588 | $opts[CURLOPT_CAINFO] = $this->cainfo; |
589 | 589 | } |
590 | 590 | |
591 | - if (! empty($this->capath)) { |
|
591 | + if (!empty($this->capath)) { |
|
592 | 592 | $opts[CURLOPT_CAPATH] = $this->capath; |
593 | 593 | } |
594 | 594 | |
@@ -663,7 +663,7 @@ discard block |
||
663 | 663 | { |
664 | 664 | $pos = strpos($this->email, '@'); |
665 | 665 | if ($pos !== false) { |
666 | - $this->tld = trim(substr($this->email, $pos+1)); |
|
666 | + $this->tld = trim(substr($this->email, $pos + 1)); |
|
667 | 667 | return true; |
668 | 668 | } |
669 | 669 | |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | */ |
694 | 694 | public function getAutodiscoverRequest() |
695 | 695 | { |
696 | - if (! empty($this->requestxml)) { |
|
696 | + if (!empty($this->requestxml)) { |
|
697 | 697 | return $this->requestxml; |
698 | 698 | } |
699 | 699 | |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | $pos = strpos($str, ':'); |
734 | 734 | if ($pos !== false) { |
735 | 735 | $key = strtolower(substr($str, 0, $pos)); |
736 | - $val = trim(substr($str, $pos+1)); |
|
736 | + $val = trim(substr($str, $pos + 1)); |
|
737 | 737 | $this->last_response_headers[$key] = $val; |
738 | 738 | } |
739 | 739 | |
@@ -772,7 +772,7 @@ discard block |
||
772 | 772 | $output = trim($node->textContent); |
773 | 773 | break; |
774 | 774 | case XML_ELEMENT_NODE: |
775 | - for ($i=0, $m = $node->childNodes->length; $i < $m; $i++) { |
|
775 | + for ($i = 0, $m = $node->childNodes->length; $i < $m; $i++) { |
|
776 | 776 | $child = $node->childNodes->item($i); |
777 | 777 | $v = $this->nodeToArray($child); |
778 | 778 | if (isset($child->tagName)) { |
@@ -802,7 +802,7 @@ discard block |
||
802 | 802 | $output['@attributes'] = $a; |
803 | 803 | } |
804 | 804 | foreach ($output as $t => $v) { |
805 | - if (is_array($v) && count($v)==1 && $t!='@attributes') { |
|
805 | + if (is_array($v) && count($v) == 1 && $t != '@attributes') { |
|
806 | 806 | $output[$t] = $v[0]; |
807 | 807 | } |
808 | 808 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | 'Connection: Keep-Alive', |
49 | 49 | 'User-Agent: PHP-SOAP-CURL', |
50 | 50 | 'Content-Type: text/xml; charset=utf-8', |
51 | - 'SOAPAction: "'.$action.'"', |
|
51 | + 'SOAPAction: "' . $action . '"', |
|
52 | 52 | ); |
53 | 53 | |
54 | 54 | $this->__last_request_headers = $headers; |
@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, $this->validate); |
59 | 59 | curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true); |
60 | 60 | curl_setopt($this->ch, CURLOPT_HTTPHEADER, $headers); |
61 | - curl_setopt($this->ch, CURLOPT_POST, true ); |
|
61 | + curl_setopt($this->ch, CURLOPT_POST, true); |
|
62 | 62 | curl_setopt($this->ch, CURLOPT_POSTFIELDS, $request); |
63 | 63 | curl_setopt($this->ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); |
64 | 64 | curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC | CURLAUTH_NTLM); |
65 | - curl_setopt($this->ch, CURLOPT_USERPWD, $this->user.':'.$this->password); |
|
65 | + curl_setopt($this->ch, CURLOPT_USERPWD, $this->user . ':' . $this->password); |
|
66 | 66 | |
67 | 67 | $response = curl_exec($this->ch); |
68 | 68 |
@@ -704,12 +704,12 @@ |
||
704 | 704 | protected function initializeSoapClient() |
705 | 705 | { |
706 | 706 | $this->soap = new SoapClient( |
707 | - dirname(__FILE__).'/assets/services.wsdl', |
|
707 | + dirname(__FILE__) . '/assets/services.wsdl', |
|
708 | 708 | array( |
709 | 709 | 'user' => $this->username, |
710 | 710 | 'password' => $this->password, |
711 | 711 | 'version' => $this->version, |
712 | - 'location' => 'https://'.$this->server.'/EWS/Exchange.asmx', |
|
712 | + 'location' => 'https://' . $this->server . '/EWS/Exchange.asmx', |
|
713 | 713 | 'impersonation' => $this->impersonation, |
714 | 714 | ) |
715 | 715 | ); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * |
18 | 18 | * @var string |
19 | 19 | */ |
20 | - public $_ ; |
|
20 | + public $_; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Returns the value of this enumeration as a string.. |
@@ -26,6 +26,6 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function __toString() |
28 | 28 | { |
29 | - return $this-> _ ; |
|
29 | + return $this-> _; |
|
30 | 30 | } |
31 | 31 | } |
@@ -19,8 +19,7 @@ |
||
19 | 19 | // If the value of the property is an object then clone it. |
20 | 20 | if (is_object($value)) { |
21 | 21 | $this->$property = clone $value; |
22 | - } |
|
23 | - elseif (is_array($value)) { |
|
22 | + } elseif (is_array($value)) { |
|
24 | 23 | // The value is an array that may use objects as values. Iterate |
25 | 24 | // over the array and clone any values that are objects into a |
26 | 25 | // new array. |
@@ -2319,7 +2319,7 @@ |
||
2319 | 2319 | * |
2320 | 2320 | * @var string |
2321 | 2321 | */ |
2322 | - const INVALID_RETENTION_TAG_TYPE_MISMATCH = 'ErrorInvalidRetentionTagTypeMismatch'; |
|
2322 | + const INVALID_RETENTION_TAG_TYPE_MISMATCH = 'ErrorInvalidRetentionTagTypeMismatch'; |
|
2323 | 2323 | |
2324 | 2324 | /** |
2325 | 2325 | * This error occurs if the routing type that is passed for an |