@@ -21,8 +21,8 @@ |
||
21 | 21 | /** |
22 | 22 | * @return string |
23 | 23 | */ |
24 | - public function getPrincipalUrl(){ |
|
25 | - return isset($this->found_props['current-user-principal']) && isset($this->found_props['current-user-principal']['href']) ? |
|
24 | + public function getPrincipalUrl() { |
|
25 | + return isset($this->found_props['current-user-principal']) && isset($this->found_props['current-user-principal']['href']) ? |
|
26 | 26 | $this->server_url.$this->found_props['current-user-principal']['href'] : null; |
27 | 27 | } |
28 | 28 | } |
29 | 29 | \ No newline at end of file |
@@ -40,13 +40,13 @@ discard block |
||
40 | 40 | * @param string|null $body |
41 | 41 | * @param int $code |
42 | 42 | */ |
43 | - public function __construct($server_url = null, $body = null, $code = HttpResponse::HttpCodeOk ) |
|
43 | + public function __construct($server_url = null, $body = null, $code = HttpResponse::HttpCodeOk) |
|
44 | 44 | { |
45 | 45 | parent::__construct($body, $code); |
46 | 46 | $this->server_url = $server_url; |
47 | - if(!empty($this->body)) { |
|
48 | - $this->xml = simplexml_load_string($this->body, 'SimpleXMLElement', LIBXML_NOCDATA); |
|
49 | - if($this->xml === FALSE) |
|
47 | + if (!empty($this->body)) { |
|
48 | + $this->xml = simplexml_load_string($this->body, 'SimpleXMLElement', LIBXML_NOCDATA); |
|
49 | + if ($this->xml === FALSE) |
|
50 | 50 | throw new XMLResponseParseException(); |
51 | 51 | $this->content = $this->toAssocArray($this->xml); |
52 | 52 | $this->parse(); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | { |
58 | 58 | } |
59 | 59 | |
60 | - protected function setContent($content){ |
|
60 | + protected function setContent($content) { |
|
61 | 61 | $this->content = $content; |
62 | 62 | } |
63 | 63 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | /** |
76 | 76 | * @return bool |
77 | 77 | */ |
78 | - protected function isValid(){ |
|
78 | + protected function isValid() { |
|
79 | 79 | return isset($this->content['response']); |
80 | 80 | } |
81 | 81 | } |
82 | 82 | \ No newline at end of file |
@@ -46,8 +46,9 @@ |
||
46 | 46 | $this->server_url = $server_url; |
47 | 47 | if(!empty($this->body)) { |
48 | 48 | $this->xml = simplexml_load_string($this->body, 'SimpleXMLElement', LIBXML_NOCDATA); |
49 | - if($this->xml === FALSE) |
|
50 | - throw new XMLResponseParseException(); |
|
49 | + if($this->xml === FALSE) { |
|
50 | + throw new XMLResponseParseException(); |
|
51 | + } |
|
51 | 52 | $this->content = $this->toAssocArray($this->xml); |
52 | 53 | $this->parse(); |
53 | 54 | } |