Completed
Pull Request — master (#30)
by Jesse
74:28 queued 61:19
created
src/Client.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.