Completed
Pull Request — master (#30)
by Jesse
74:28 queued 61:19
created
src/AbstractClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Util/UrlHelpersTrait.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 namespace PCextreme\Cloudstack\Util;
6 6
 
7 7
 use InvalidArgumentException;
8
-use PCextreme\Cloudstack\Exception\ClientException;
9 8
 
10 9
 trait UrlHelpersTrait
11 10
 {
Please login to merge, or discard this patch.
src/Console/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public function getHelp() : string
36 36
     {
37
-        return self::$logo . parent::getHelp();
37
+        return self::$logo.parent::getHelp();
38 38
     }
39 39
 
40 40
     /**
Please login to merge, or discard this patch.
src/Console/ApiListCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
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.