@@ -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 |
@@ -609,7 +609,7 @@ discard block |
||
| 609 | 609 | * Parse the Autoresponse Payload, particularly to determine if an |
| 610 | 610 | * additional request is necessary. |
| 611 | 611 | * |
| 612 | - * @return mixed FALSE if response isn't XML or parsed response array |
|
| 612 | + * @return boolean FALSE if response isn't XML or parsed response array |
|
| 613 | 613 | */ |
| 614 | 614 | protected function parseAutodiscoverResponse() |
| 615 | 615 | { |
@@ -751,7 +751,7 @@ discard block |
||
| 751 | 751 | * Recursive method for parsing DOM nodes. |
| 752 | 752 | * |
| 753 | 753 | * @link https://github.com/gaarf/XML-string-to-PHP-array |
| 754 | - * @param object $node DOMNode object |
|
| 754 | + * @param \DOMElement $node DOMNode object |
|
| 755 | 755 | * @return mixed |
| 756 | 756 | */ |
| 757 | 757 | protected function nodeToArray($node) |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | { |
| 306 | 306 | $svbinary = base_convert($version_hex, 16, 2); |
| 307 | 307 | if (strlen($svbinary) == 31) { |
| 308 | - $svbinary = '0'.$svbinary; |
|
| 308 | + $svbinary = '0' . $svbinary; |
|
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | $majorversion = base_convert(substr($svbinary, 4, 6), 2, 10); |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | public function trySubdomainUnauthenticatedGet() |
| 448 | 448 | { |
| 449 | 449 | $this->reset(); |
| 450 | - $url = 'http://autodiscover.'.$this->tld . self::AUTODISCOVER_PATH; |
|
| 450 | + $url = 'http://autodiscover.' . $this->tld . self::AUTODISCOVER_PATH; |
|
| 451 | 451 | $ch = curl_init(); |
| 452 | 452 | $opts = array( |
| 453 | 453 | CURLOPT_URL => $url, |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | CURLOPT_CUSTOMREQUEST => 'POST', |
| 564 | 564 | CURLOPT_POSTFIELDS => $this->getAutoDiscoverRequest(), |
| 565 | 565 | CURLOPT_RETURNTRANSFER => true, |
| 566 | - CURLOPT_USERPWD => $this->username.':'.$this->password, |
|
| 566 | + CURLOPT_USERPWD => $this->username . ':' . $this->password, |
|
| 567 | 567 | CURLOPT_TIMEOUT => $timeout, |
| 568 | 568 | CURLOPT_CONNECTTIMEOUT => $this->connection_timeout, |
| 569 | 569 | CURLOPT_FOLLOWLOCATION => true, |
@@ -577,11 +577,11 @@ discard block |
||
| 577 | 577 | // Set the appropriate content-type. |
| 578 | 578 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml; charset=utf-8')); |
| 579 | 579 | |
| 580 | - if (! empty($this->cainfo)) { |
|
| 580 | + if (!empty($this->cainfo)) { |
|
| 581 | 581 | $opts[CURLOPT_CAINFO] = $this->cainfo; |
| 582 | 582 | } |
| 583 | 583 | |
| 584 | - if (! empty($this->capath)) { |
|
| 584 | + if (!empty($this->capath)) { |
|
| 585 | 585 | $opts[CURLOPT_CAPATH] = $this->capath; |
| 586 | 586 | } |
| 587 | 587 | |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | { |
| 655 | 655 | $pos = strpos($this->email, '@'); |
| 656 | 656 | if ($pos !== false) { |
| 657 | - $this->tld = trim(substr($this->email, $pos+1)); |
|
| 657 | + $this->tld = trim(substr($this->email, $pos + 1)); |
|
| 658 | 658 | return true; |
| 659 | 659 | } |
| 660 | 660 | |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | */ |
| 685 | 685 | public function getAutodiscoverRequest() |
| 686 | 686 | { |
| 687 | - if (! empty($this->requestxml)) { |
|
| 687 | + if (!empty($this->requestxml)) { |
|
| 688 | 688 | return $this->requestxml; |
| 689 | 689 | } |
| 690 | 690 | |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | $pos = strpos($str, ':'); |
| 725 | 725 | if ($pos !== false) { |
| 726 | 726 | $key = strtolower(substr($str, 0, $pos)); |
| 727 | - $val = trim(substr($str, $pos+1)); |
|
| 727 | + $val = trim(substr($str, $pos + 1)); |
|
| 728 | 728 | $this->last_response_headers[$key] = $val; |
| 729 | 729 | } |
| 730 | 730 | |
@@ -763,7 +763,7 @@ discard block |
||
| 763 | 763 | $output = trim($node->textContent); |
| 764 | 764 | break; |
| 765 | 765 | case XML_ELEMENT_NODE: |
| 766 | - for ($i=0, $m = $node->childNodes->length; $i < $m; $i++) { |
|
| 766 | + for ($i = 0, $m = $node->childNodes->length; $i < $m; $i++) { |
|
| 767 | 767 | $child = $node->childNodes->item($i); |
| 768 | 768 | $v = $this->nodeToArray($child); |
| 769 | 769 | if (isset($child->tagName)) { |
@@ -793,7 +793,7 @@ discard block |
||
| 793 | 793 | $output['@attributes'] = $a; |
| 794 | 794 | } |
| 795 | 795 | foreach ($output as $t => $v) { |
| 796 | - if (is_array($v) && count($v)==1 && $t!='@attributes') { |
|
| 796 | + if (is_array($v) && count($v) == 1 && $t != '@attributes') { |
|
| 797 | 797 | $output[$t] = $v[0]; |
| 798 | 798 | } |
| 799 | 799 | } |