@@ -30,8 +30,12 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function getStatus() |
| 32 | 32 | { |
| 33 | - if(isset($this->content['response']['status'])) return $this->content['response']['status']; |
|
| 34 | - if(isset($this->content['response']['propstat']['status'])) return $this->content['response']['propstat']['status']; |
|
| 33 | + if(isset($this->content['response']['status'])) { |
|
| 34 | + return $this->content['response']['status']; |
|
| 35 | + } |
|
| 36 | + if(isset($this->content['response']['propstat']['status'])) { |
|
| 37 | + return $this->content['response']['propstat']['status']; |
|
| 38 | + } |
|
| 35 | 39 | |
| 36 | 40 | return null; |
| 37 | 41 | } |
@@ -50,8 +50,9 @@ |
||
| 50 | 50 | $this->stripped = $this->stripNamespacesFromTags($this->body); |
| 51 | 51 | // Merge CDATA as text nodes |
| 52 | 52 | $this->xml = simplexml_load_string($this->stripped, null, LIBXML_NOCDATA); |
| 53 | - if ($this->xml === FALSE) |
|
| 54 | - throw new XMLResponseParseException(); |
|
| 53 | + if ($this->xml === FALSE) { |
|
| 54 | + throw new XMLResponseParseException(); |
|
| 55 | + } |
|
| 55 | 56 | $this->content = $this->toAssocArray($this->xml); |
| 56 | 57 | |
| 57 | 58 | $this->parse(); |
@@ -22,9 +22,13 @@ |
||
| 22 | 22 | * @return string |
| 23 | 23 | */ |
| 24 | 24 | public function getVCard() { |
| 25 | - if (!isset($this->found_props['calendar-data'])) return null; |
|
| 25 | + if (!isset($this->found_props['calendar-data'])) { |
|
| 26 | + return null; |
|
| 27 | + } |
|
| 26 | 28 | $calendar_data = $this->found_props['calendar-data']; |
| 27 | - if (!is_string($calendar_data)) return null; |
|
| 29 | + if (!is_string($calendar_data)) { |
|
| 30 | + return null; |
|
| 31 | + } |
|
| 28 | 32 | return $calendar_data; |
| 29 | 33 | } |
| 30 | 34 | } |
| 31 | 35 | \ No newline at end of file |