@@ -122,9 +122,9 @@ discard block |
||
| 122 | 122 | return $this->validText; |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | - /** |
|
| 126 | - * @return array|null |
|
| 127 | - */ |
|
| 125 | + /** |
|
| 126 | + * @return array|null |
|
| 127 | + */ |
|
| 128 | 128 | public function getError() |
| 129 | 129 | { |
| 130 | 130 | if (isset($this->response->innererror)) { |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | public function toArray() |
| 141 | 141 | { |
| 142 | - return $this->xmlToArrayRecursive($this->validText); |
|
| 142 | + return $this->xmlToArrayRecursive($this->validText); |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /** |
@@ -84,12 +84,12 @@ discard block |
||
| 84 | 84 | $this->response = simplexml_load_string($response); |
| 85 | 85 | $copyXml = $this->response; |
| 86 | 86 | |
| 87 | - if ( $this->response === false || $this->checkIntegrity($this->response) === false ) |
|
| 87 | + if ($this->response === false || $this->checkIntegrity($this->response) === false) |
|
| 88 | 88 | { |
| 89 | 89 | return []; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - $array_vars_list = get_object_vars($copyXml); |
|
| 92 | + $array_vars_list = get_object_vars($copyXml); |
|
| 93 | 93 | |
| 94 | 94 | if (key_exists('content', $array_vars_list)) { |
| 95 | 95 | return $this->arrayOne(); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public function checkIntegrity($response) |
| 109 | 109 | { |
| 110 | - if ( empty($response->message) ) |
|
| 110 | + if (empty($response->message)) |
|
| 111 | 111 | { |
| 112 | 112 | return true; |
| 113 | 113 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | public function getError() |
| 129 | 129 | { |
| 130 | 130 | if (isset($this->response->innererror)) { |
| 131 | - return (array)$this->response->innererror; |
|
| 131 | + return (array) $this->response->innererror; |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | return null; |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | private function workspace() |
| 168 | 168 | { |
| 169 | 169 | foreach ($this->response->workspace->collection as $item) { |
| 170 | - $this->validText[] = get_object_vars($item->children( $this->namespaces['NamespaceAtom'] ))['title']; |
|
| 170 | + $this->validText[] = get_object_vars($item->children($this->namespaces['NamespaceAtom']))['title']; |
|
| 171 | 171 | } |
| 172 | 172 | return $this; |
| 173 | 173 | } |
@@ -179,8 +179,8 @@ discard block |
||
| 179 | 179 | */ |
| 180 | 180 | private function arrayMany() |
| 181 | 181 | { |
| 182 | - foreach ($this->response->children( $this->namespaces['NamespaceAtom'] )->entry as $item ) { |
|
| 183 | - $this->validText[] = $item->content->children( $this->namespaces['NamespaceMetadata'] ) |
|
| 182 | + foreach ($this->response->children($this->namespaces['NamespaceAtom'])->entry as $item) { |
|
| 183 | + $this->validText[] = $item->content->children($this->namespaces['NamespaceMetadata']) |
|
| 184 | 184 | ->children($this->namespaces['NamespaceDataServices']); |
| 185 | 185 | } |
| 186 | 186 | return $this; |
@@ -191,9 +191,9 @@ discard block |
||
| 191 | 191 | */ |
| 192 | 192 | private function arrayOne() |
| 193 | 193 | { |
| 194 | - $this->validText = $this->response->children( $this->namespaces['NamespaceAtom'] )->content |
|
| 195 | - ->children( $this->namespaces['NamespaceMetadata'] ) |
|
| 196 | - ->children( $this->namespaces['NamespaceDataServices'] ); |
|
| 194 | + $this->validText = $this->response->children($this->namespaces['NamespaceAtom'])->content |
|
| 195 | + ->children($this->namespaces['NamespaceMetadata']) |
|
| 196 | + ->children($this->namespaces['NamespaceDataServices']); |
|
| 197 | 197 | return $this; |
| 198 | 198 | } |
| 199 | 199 | |
@@ -230,11 +230,11 @@ discard block |
||
| 230 | 230 | $xmlns_dcd->appendChild($valued); |
| 231 | 231 | |
| 232 | 232 | //---------- properties ----------// |
| 233 | - $properties = $dom->createElement('m:properties'); |
|
| 233 | + $properties = $dom->createElement('m:properties'); |
|
| 234 | 234 | $content->appendChild($properties); |
| 235 | 235 | |
| 236 | 236 | foreach ($data as $nameField => $valueField) { |
| 237 | - $element = $dom->createElement($this->prefixNamespace.':'.$nameField); |
|
| 237 | + $element = $dom->createElement($this->prefixNamespace . ':' . $nameField); |
|
| 238 | 238 | $properties->appendChild($element); |
| 239 | 239 | $valued = $dom->createTextNode($valueField); |
| 240 | 240 | $element->appendChild($valued); |