| @@ -71,7 +71,7 @@ | ||
| 71 | 71 | $clientOptions = ['timeout', 'proxy']; | 
| 72 | 72 | |
| 73 | 73 | // Only allow turning off ssl verification is it's for a proxy | 
| 74 | -        if (! empty($options['proxy'])) { | |
| 74 | +        if (!empty($options['proxy'])) { | |
| 75 | 75 | $clientOptions[] = 'verify'; | 
| 76 | 76 | } | 
| 77 | 77 | |
| @@ -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 |      { | 
| @@ -81,7 +81,7 @@ discard block | ||
| 81 | 81 | protected function askApiKey(InputInterface $input, OutputInterface $output) | 
| 82 | 82 |      { | 
| 83 | 83 |          $question = (new Question('Enter API key: ')) | 
| 84 | -            ->setValidator(function ($answer) { | |
| 84 | +            ->setValidator(function($answer) { | |
| 85 | 85 |                  if (is_null($answer)) { | 
| 86 | 86 |                      throw new \InvalidArgumentException("API key can't be null."); | 
| 87 | 87 | } | 
| @@ -103,7 +103,7 @@ discard block | ||
| 103 | 103 | protected function askSecretKey(InputInterface $input, OutputInterface $output) | 
| 104 | 104 |      { | 
| 105 | 105 |          $question = (new Question('Enter secret key: ')) | 
| 106 | -            ->setValidator(function ($answer) { | |
| 106 | +            ->setValidator(function($answer) { | |
| 107 | 107 |                  if (is_null($answer)) { | 
| 108 | 108 |                      throw new \InvalidArgumentException("Secret key can't be null."); | 
| 109 | 109 | } | 
| @@ -143,7 +143,7 @@ discard block | ||
| 143 | 143 | |
| 144 | 144 | $listFile .= " '$name' => array(\n"; | 
| 145 | 145 | $listFile .= " 'description' => '$description',\n"; | 
| 146 | - $listFile .= " 'isasync' => " . ($isAsync ? "true" : "false") . ",\n"; | |
| 146 | + $listFile .= " 'isasync' => ".($isAsync ? "true" : "false").",\n"; | |
| 147 | 147 | $listFile .= " 'params' => array(\n"; | 
| 148 | 148 | |
| 149 | 149 |              foreach ($api['params'] as $param) { | 
| @@ -155,7 +155,7 @@ discard block | ||
| 155 | 155 | $listFile .= " '$paramName' => array(\n"; | 
| 156 | 156 | $listFile .= " 'description' => '$paramDescription',\n"; | 
| 157 | 157 | $listFile .= " 'type' => '$paramType',\n"; | 
| 158 | - $listFile .= " 'required' => " . ($paramRequired ? "true" : "false") . ",\n"; | |
| 158 | + $listFile .= " 'required' => ".($paramRequired ? "true" : "false").",\n"; | |
| 159 | 159 | $listFile .= " ),\n"; | 
| 160 | 160 | } | 
| 161 | 161 | |
| @@ -167,7 +167,7 @@ discard block | ||
| 167 | 167 | |
| 168 | 168 | $listFile .= ");\n"; | 
| 169 | 169 | |
| 170 | - file_put_contents(__DIR__ . '/../../cache/api_list.php', $listFile); | |
| 170 | + file_put_contents(__DIR__.'/../../cache/api_list.php', $listFile); | |
| 171 | 171 | |
| 172 | 172 | $progress->finish(); | 
| 173 | 173 | } | 
| @@ -34,7 +34,7 @@ | ||
| 34 | 34 | */ | 
| 35 | 35 | public function getHelp() | 
| 36 | 36 |      { | 
| 37 | - return self::$logo . parent::getHelp(); | |
| 37 | + return self::$logo.parent::getHelp(); | |
| 38 | 38 | } | 
| 39 | 39 | |
| 40 | 40 | /** | 
| @@ -52,7 +52,7 @@ | ||
| 52 | 52 | ]; | 
| 53 | 53 | |
| 54 | 54 | $base = $this->urlConsole; | 
| 55 | - $query = $this->getCommandQuery($params); | |
| 55 | + $query = $this->getCommandQuery($params); | |
| 56 | 56 | |
| 57 | 57 | return $this->appendQuery($base, $query); | 
| 58 | 58 | } | 
| @@ -343,7 +343,7 @@ 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 | |
| @@ -362,7 +362,7 @@ 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) { | |
| 365 | +        array_walk($queryParams, function(&$value, $key) { | |
| 366 | 366 | $value = $key.'='.rawurlencode($value); | 
| 367 | 367 | }); | 
| 368 | 368 | |