@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * Method will use the input Result to replace the placeholders in $this->jsonOutput or return an array with |
111 | 111 | * the default values. |
112 | 112 | * |
113 | - * @param $result \phpbu\App\Result |
|
113 | + * @param Result $result \phpbu\App\Result |
|
114 | 114 | * @return array: will return array placeholders are replaced with correct data |
115 | 115 | */ |
116 | 116 | public function getOutput($result) : array |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | * Simple toXml function |
195 | 195 | * |
196 | 196 | * @author Francis Lewis: https://stackoverflow.com/a/19987539 |
197 | - * @param SimpleXMLElement $object |
|
197 | + * @param \SimpleXMLElement $object |
|
198 | 198 | * @param array $data |
199 | 199 | */ |
200 | 200 | private function toXml(\SimpleXMLElement $object, array $data) |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | // check if json_decode succeeded, otherwise return default parameters |
135 | 135 | if ($outputArray) { |
136 | 136 | // only value where valuestring equals vars key is supported. |
137 | - array_walk_recursive($outputArray, function (&$value, &$key) use ($vars) { |
|
137 | + array_walk_recursive($outputArray, function(&$value, &$key) use ($vars) { |
|
138 | 138 | if (strpos($value, '__') === 0) { |
139 | 139 | $value = $vars[$value]; |
140 | 140 | } |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $ch = curl_init(); |
158 | 158 | $uri = $this->options['uri']; |
159 | 159 | if (strtoupper($this->options['method']) == 'GET') { |
160 | - $uri .= '?' . http_build_query($output); |
|
160 | + $uri .= '?'.http_build_query($output); |
|
161 | 161 | } |
162 | 162 | curl_setopt($ch, CURLOPT_URL, $uri); |
163 | 163 | if (strtoupper($this->options['method']) == 'POST') { |
@@ -166,11 +166,11 @@ discard block |
||
166 | 166 | curl_setopt($ch, CURLOPT_POSTFIELDS, $output); |
167 | 167 | } |
168 | 168 | if (!empty($this->options['auth-user']) && !empty($this->options['auth-pwd'])) { |
169 | - curl_setopt($ch, CURLOPT_USERPWD, $this->options['auth-user'] . ":" . $this->options['auth-pwd']); |
|
169 | + curl_setopt($ch, CURLOPT_USERPWD, $this->options['auth-user'].":".$this->options['auth-pwd']); |
|
170 | 170 | } |
171 | 171 | curl_setopt($ch, CURLOPT_HTTPHEADER, [ |
172 | - 'Content-Type: ' . $this->options['content-type'], |
|
173 | - 'Accept: ' . $this->options['content-type'] |
|
172 | + 'Content-Type: '.$this->options['content-type'], |
|
173 | + 'Accept: '.$this->options['content-type'] |
|
174 | 174 | ]); |
175 | 175 | curl_exec($ch); |
176 | 176 | curl_close($ch); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $this->toXml($new_object, $value); |
213 | 213 | } else { |
214 | 214 | // if the key is an integer, it needs text with it to actually work. |
215 | - if ($key == (int)$key) { |
|
215 | + if ($key == (int) $key) { |
|
216 | 216 | $key = "key_$key"; |
217 | 217 | } |
218 | 218 |