@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | protected function askApiKey(InputInterface $input, OutputInterface $output) : string |
100 | 100 | { |
101 | 101 | $question = (new Question('Enter API key: ')) |
102 | - ->setValidator(function ($answer) { |
|
102 | + ->setValidator(function($answer) { |
|
103 | 103 | if (is_null($answer)) { |
104 | 104 | throw new \InvalidArgumentException("API key can't be null."); |
105 | 105 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | protected function askSecretKey(InputInterface $input, OutputInterface $output) : string |
122 | 122 | { |
123 | 123 | $question = (new Question('Enter secret key: ')) |
124 | - ->setValidator(function ($answer) { |
|
124 | + ->setValidator(function($answer) { |
|
125 | 125 | if (is_null($answer)) { |
126 | 126 | throw new \InvalidArgumentException("Secret key can't be null."); |
127 | 127 | } |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | */ |
195 | 195 | private function cache() : FilesystemCache |
196 | 196 | { |
197 | - if (! isset($this->cache)) { |
|
197 | + if (!isset($this->cache)) { |
|
198 | 198 | $this->cache = new FilesystemCache('', 0, __DIR__.'/../../cache'); |
199 | 199 | } |
200 | 200 |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | */ |
178 | 178 | private function assertRequiredCommandOptions(string $command, array $options = []) : void |
179 | 179 | { |
180 | - if (! $this->isCommandValid($command)) { |
|
180 | + if (!$this->isCommandValid($command)) { |
|
181 | 181 | throw new RuntimeException( |
182 | 182 | "Call to unsupported API command [{$command}], this call is not present in the API list." |
183 | 183 | ); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | |
189 | 189 | $missing = array_diff($requiredParameters, $providedParameters); |
190 | 190 | |
191 | - if (! empty($missing)) { |
|
191 | + if (!empty($missing)) { |
|
192 | 192 | $missing = implode(', ', $missing); |
193 | 193 | |
194 | 194 | throw new InvalidArgumentException( |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | $commands = $this->getApiList(); |
218 | 218 | $parameters = $commands[$command]['params']; |
219 | 219 | |
220 | - $required = array_filter($parameters, function ($rules) { |
|
220 | + $required = array_filter($parameters, function($rules) { |
|
221 | 221 | return (bool) $rules['required']; |
222 | 222 | }); |
223 | 223 | |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | public function getApiList() : array |
329 | 329 | { |
330 | 330 | if (is_null($this->apiList)) { |
331 | - if (! $this->cache()->has('api.list')) { |
|
331 | + if (!$this->cache()->has('api.list')) { |
|
332 | 332 | throw new RuntimeException( |
333 | 333 | "Cloudstack Client API list not found. This file needs to be generated before using the client." |
334 | 334 | ); |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | { |
380 | 380 | // We need to modify the nested array keys to get them accepted by Cloudstack. |
381 | 381 | // For example 'details[0][key]' should resolve to 'details[0].key'. |
382 | - array_walk($params, function (&$value, $key) { |
|
382 | + array_walk($params, function(&$value, $key) { |
|
383 | 383 | if (is_array($value)) { |
384 | 384 | $parsedParams = []; |
385 | 385 | |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | // to encode the values, but we can't encode the keys. This would otherwise |
399 | 399 | // compromise the signature. Therefore we can't use http_build_query(). |
400 | 400 | $queryParams = $this->flattenParams($params); |
401 | - array_walk($queryParams, function (&$value, $key) { |
|
401 | + array_walk($queryParams, function(&$value, $key) { |
|
402 | 402 | $value = $key.'='.rawurlencode($value); |
403 | 403 | }); |
404 | 404 | |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | */ |
479 | 479 | private function cache() : FilesystemCache |
480 | 480 | { |
481 | - if (! isset($this->cache)) { |
|
481 | + if (!isset($this->cache)) { |
|
482 | 482 | $this->cache = new FilesystemCache('', 0, __DIR__.'/../../cache'); |
483 | 483 | } |
484 | 484 |