Passed
Branch master (6512d2)
by P.R.
03:04
created
src/Resource/Company.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,8 +90,7 @@
 block discarded – undo
90 90
       $this->locale      = Cast::toManString($response['locale']);
91 91
       $this->name        = Cast::toManString($response['name']);
92 92
       $this->zipCode     = Cast::toOptString($response['zipcode']);
93
-    }
94
-    catch (\Throwable $exception)
93
+    } catch (\Throwable $exception)
95 94
     {
96 95
       throw new ClubCollectApiException([$exception], 'Failed to create a company');
97 96
     }
Please login to merge, or discard this patch.
src/Resource/Import.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,13 +71,11 @@
 block discarded – undo
71 71
         {
72 72
           $this->invoiceIds[] = Cast::toManString($id);
73 73
         }
74
-      }
75
-      else
74
+      } else
76 75
       {
77 76
         $this->invoiceIds = null;
78 77
       }
79
-    }
80
-    catch (\Throwable $exception)
78
+    } catch (\Throwable $exception)
81 79
     {
82 80
       throw new ClubCollectApiException([$exception], 'Failed to create an import');
83 81
     }
Please login to merge, or discard this patch.
src/Helper/Cast.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,9 @@  discard block
 block discarded – undo
49 49
   {
50 50
     $epoch = static::toOptString($value, $default);
51 51
 
52
-    if ($epoch===null) return null;
52
+    if ($epoch===null) {
53
+     return null;
54
+    }
53 55
 
54 56
     return new \DateTime($epoch);
55 57
   }
@@ -65,7 +67,9 @@  discard block
 block discarded – undo
65 67
    */
66 68
   public static function toOptString($value, ?string $default = null): ?string
67 69
   {
68
-    if ($value==='') return null;
70
+    if ($value==='') {
71
+     return null;
72
+    }
69 73
 
70 74
     return parent::toOptString($value, $default);
71 75
   }
Please login to merge, or discard this patch.
src/ClubCollectApiClient.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
       {
280 280
         if ($first)
281 281
         {
282
-          $uri   .= '?';
282
+          $uri .= '?';
283 283
           $first = false;
284 284
         }
285 285
         else
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
    */
328 328
   private function parseResponseBody(ResponseInterface $response): ?array
329 329
   {
330
-    $body = (string)$response->getBody();
330
+    $body = (string) $response->getBody();
331 331
     if (empty($body))
332 332
     {
333 333
       if ($response->getStatusCode()===self::HTTP_NO_CONTENT)
Please login to merge, or discard this patch.
Braces   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -191,8 +191,7 @@  discard block
 block discarded – undo
191 191
     try
192 192
     {
193 193
       $response = $this->httpClient->send($request, ['http_errors' => false]);
194
-    }
195
-    catch (GuzzleException $exception)
194
+    } catch (GuzzleException $exception)
196 195
     {
197 196
       throw ClubCollectApiException::createFromGuzzleException($exception);
198 197
     }
@@ -225,8 +224,7 @@  discard block
 block discarded – undo
225 224
     try
226 225
     {
227 226
       $encoded = \GuzzleHttp\json_encode($body);
228
-    }
229
-    catch (\InvalidArgumentException $exception)
227
+    } catch (\InvalidArgumentException $exception)
230 228
     {
231 229
       throw new ClubCollectApiException([$exception],
232 230
                                         'Error encoding parameters into JSON: %s',
@@ -269,7 +267,9 @@  discard block
 block discarded – undo
269 267
    */
270 268
   private function composerQuery(?array $query): string
271 269
   {
272
-    if (empty($query)) return '';
270
+    if (empty($query)) {
271
+     return '';
272
+    }
273 273
 
274 274
     $uri   = '';
275 275
     $first = true;
@@ -281,8 +281,7 @@  discard block
 block discarded – undo
281 281
         {
282 282
           $uri   .= '?';
283 283
           $first = false;
284
-        }
285
-        else
284
+        } else
286 285
         {
287 286
           $uri .= '&';
288 287
         }
Please login to merge, or discard this patch.