@@ -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 | } |