@@ -63,7 +63,7 @@ |
||
63 | 63 | * Return the list of options that can be passed to the HttpClient |
64 | 64 | * |
65 | 65 | * @param array $options |
66 | - * @return array |
|
66 | + * @return string[] |
|
67 | 67 | */ |
68 | 68 | protected function getAllowedClientOptions(array $options) |
69 | 69 | { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $method = $this->getCommandMethod($command); |
36 | 36 | $query = $this->enableSso()->getCommandQuery($params); |
37 | 37 | |
38 | - return $this->urlClient . '?loginUrl=' . urlencode($query); |
|
38 | + return $this->urlClient.'?loginUrl='.urlencode($query); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | ]; |
87 | 87 | |
88 | 88 | $base = $this->urlConsole; |
89 | - $query = $this->getCommandQuery($params); |
|
89 | + $query = $this->getCommandQuery($params); |
|
90 | 90 | |
91 | 91 | return $this->appendQuery($base, $query); |
92 | 92 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | if (!empty($missing)) { |
137 | 137 | throw new InvalidArgumentException( |
138 | - 'Required options not defined: ' . implode(', ', array_keys($missing)) |
|
138 | + 'Required options not defined: '.implode(', ', array_keys($missing)) |
|
139 | 139 | ); |
140 | 140 | } |
141 | 141 | } |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | |
276 | 276 | // To prevent the signature from being escaped we simply append |
277 | 277 | // the signature to the previously build query. |
278 | - return $query . '&signature=' . $signature; |
|
278 | + return $query.'&signature='.$signature; |
|
279 | 279 | } |
280 | 280 | |
281 | 281 | /** |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | public function getApiList() |
291 | 291 | { |
292 | 292 | if (is_null($this->apiList)) { |
293 | - $path = __DIR__ . '/../cache/api_list.php'; |
|
293 | + $path = __DIR__.'/../cache/api_list.php'; |
|
294 | 294 | |
295 | 295 | if (!file_exists($path)) { |
296 | 296 | throw new RuntimeException( |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | $query = trim($query, '?&'); |
328 | 328 | |
329 | 329 | if ($query) { |
330 | - return $url . '?' . $query; |
|
330 | + return $url.'?'.$query; |
|
331 | 331 | } |
332 | 332 | |
333 | 333 | return $url; |
@@ -343,14 +343,14 @@ discard block |
||
343 | 343 | { |
344 | 344 | // We need to modify the nested array keys to get them accepted by Cloudstack. |
345 | 345 | // For example 'details[0][key]' should resolve to 'details[0].key'. |
346 | - array_walk($params, function (&$value, $key) { |
|
346 | + array_walk($params, function(&$value, $key) { |
|
347 | 347 | if (is_array($value)) { |
348 | 348 | $parsedParams = []; |
349 | 349 | |
350 | 350 | foreach ($value as $index => $entry) { |
351 | 351 | $parsedParams[] = [ |
352 | - $key . '[' . $index . ']' . '.key' => $entry['key'], |
|
353 | - $key . '[' . $index . ']' . '.value' => $entry['value'], |
|
352 | + $key.'['.$index.']'.'.key' => $entry['key'], |
|
353 | + $key.'['.$index.']'.'.value' => $entry['value'], |
|
354 | 354 | ]; |
355 | 355 | } |
356 | 356 | |
@@ -362,8 +362,8 @@ discard block |
||
362 | 362 | // to encode the values, but we can't encode the keys. This would otherwise |
363 | 363 | // compromise the signature. Therefore we can't use http_build_query(). |
364 | 364 | $queryParams = $this->flattenParams($params); |
365 | - array_walk($queryParams, function (&$value, $key) { |
|
366 | - $value = $key . '=' . rawurlencode($value); |
|
365 | + array_walk($queryParams, function(&$value, $key) { |
|
366 | + $value = $key.'='.rawurlencode($value); |
|
367 | 367 | }); |
368 | 368 | |
369 | 369 | return implode('&', $queryParams); |