@@ -31,7 +31,7 @@ |
||
31 | 31 | //$test->authentication(); |
32 | 32 | |
33 | 33 | // 5. Example Reading from API |
34 | -$test = $test->action('read:json', function ($read){ |
|
34 | +$test = $test->action('read:json', function($read) { |
|
35 | 35 | $read->amount(1)->skip(100); |
36 | 36 | |
37 | 37 | })->get(); |
@@ -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 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | private function workspace() |
156 | 156 | { |
157 | 157 | foreach ($this->response->workspace->collection as $item) { |
158 | - $this->validText[] = get_object_vars($item->children( $this->namespaces['NamespaceAtom'] ))['title']; |
|
158 | + $this->validText[] = get_object_vars($item->children($this->namespaces['NamespaceAtom']))['title']; |
|
159 | 159 | } |
160 | 160 | return $this; |
161 | 161 | } |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | */ |
168 | 168 | private function arrayMany() |
169 | 169 | { |
170 | - foreach ($this->response->children( $this->namespaces['NamespaceAtom'] )->entry as $item ) { |
|
171 | - $this->validText[] = $item->content->children( $this->namespaces['NamespaceMetadata'] ) |
|
170 | + foreach ($this->response->children($this->namespaces['NamespaceAtom'])->entry as $item) { |
|
171 | + $this->validText[] = $item->content->children($this->namespaces['NamespaceMetadata']) |
|
172 | 172 | ->children($this->namespaces['NamespaceDataServices']); |
173 | 173 | } |
174 | 174 | return $this; |
@@ -179,9 +179,9 @@ discard block |
||
179 | 179 | */ |
180 | 180 | private function arrayOne() |
181 | 181 | { |
182 | - $this->validText = $this->response->children( $this->namespaces['NamespaceAtom'] )->content |
|
183 | - ->children( $this->namespaces['NamespaceMetadata'] ) |
|
184 | - ->children( $this->namespaces['NamespaceDataServices'] ); |
|
182 | + $this->validText = $this->response->children($this->namespaces['NamespaceAtom'])->content |
|
183 | + ->children($this->namespaces['NamespaceMetadata']) |
|
184 | + ->children($this->namespaces['NamespaceDataServices']); |
|
185 | 185 | return $this; |
186 | 186 | } |
187 | 187 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | $xmlns_dcd->appendChild($valued); |
219 | 219 | |
220 | 220 | //---------- properties ----------// |
221 | - $properties = $dom->createElement('m:properties'); |
|
221 | + $properties = $dom->createElement('m:properties'); |
|
222 | 222 | $content->appendChild($properties); |
223 | 223 | |
224 | 224 | foreach ($data as $nameField => $valueField) { |