Passed
Pull Request — develop (#87)
by
unknown
12:10
created
src/Resources/Events.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         /** @var array{id: string, object: string, created_at: int, bytes: int, filename: string, purpose: string, status: string, status_details: array<array-key, mixed>|string|null} $result */
41 41
         $result = $this->transporter->requestObject($payload);
42 42
 
43
-        if(!array_key_exists('included', $result)) {
43
+        if (!array_key_exists('included', $result)) {
44 44
             return RetrieveResponse::from($result['data']);
45 45
         }
46 46
         else {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
 
43 43
         if(!array_key_exists('included', $result)) {
44 44
             return RetrieveResponse::from($result['data']);
45
-        }
46
-        else {
45
+        } else {
47 46
             return RetrieveResponse::from($result['data'], $result['included']);
48 47
         }
49 48
     }
Please login to merge, or discard this patch.
src/Bookwhen.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         if (!$this->validator->validInclude($includeAttachments)) {
258 258
             throw new ValidationException('includeAttachments', $includeAttachments);
259 259
         } else {
260
-            if($includeAttachments) {
260
+            if ($includeAttachments) {
261 261
                 array_push($this->includes, 'attachments');
262 262
             }
263 263
         }
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         if (!$this->validator->validInclude($includeLocation)) {
267 267
             throw new ValidationException('includeLocation', $includeLocation);
268 268
         } else {
269
-            if($includeLocation) {
269
+            if ($includeLocation) {
270 270
                 array_push($this->includes, 'location');
271 271
             }
272 272
         }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         if (!$this->validator->validInclude($includeTickets)) {
276 276
             throw new ValidationException('includeTickets', $includeTickets);
277 277
         } else {
278
-            if($includeTickets) {
278
+            if ($includeTickets) {
279 279
                 array_push($this->includes, 'tickets');
280 280
             }
281 281
         }
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
         if (!$this->validator->validInclude($includeTicketsEvents)) {
285 285
             throw new ValidationException('includeTicketsEvents', $includeTicketsEvents);
286 286
         } else {
287
-            if($includeTicketsEvents) {
287
+            if ($includeTicketsEvents) {
288 288
                 array_push($this->includes, 'tickets.events');
289 289
             }
290 290
         }
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
         if (!$this->validator->validInclude($includeTicketsClassPasses)) {
294 294
             throw new ValidationException('includeTicketsClassPasses', $includeTicketsClassPasses);
295 295
         } else {
296
-            if($includeTicketsClassPasses) {
296
+            if ($includeTicketsClassPasses) {
297 297
                 array_push($this->includes, 'tickets.class_passes');
298 298
             }
299 299
         }
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
         $eventTickets = []; // deprecated
305 305
 
306 306
         // attachments
307
-        if($includeAttachments) {
307
+        if ($includeAttachments) {
308 308
 //             foreach ($event->attachments as $eventAttachment) {
309 309
 //                 $attachment = $this->client->attachments()->retrieve($eventAttachment['id']);
310 310
 //                 array_push($eventAttachments, new Attachment(
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
         }
321 321
 
322 322
         // tickets
323
-        if($includeTickets) {
323
+        if ($includeTickets) {
324 324
 //             foreach ($event->tickets as $eventTicket) {
325 325
 //                 $ticket = $this->client->tickets()->retrieve($eventTicket['id']);
326 326
 //                 array_push($eventTickets, new Ticket(
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
                 throw new ValidationException('detail', implode(' ', $detail));
406 406
             } else {
407 407
                 $detail = array_unique($detail);
408
-                foreach($detail as $item) {
408
+                foreach ($detail as $item) {
409 409
                     if (!$this->validator->validLocation($item)) {
410 410
                         throw new ValidationException('detail', $item);
411 411
                     }
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
                 throw new ValidationException('location', implode(' ', $title));
433 433
             } else {
434 434
                 $location = array_unique($location);
435
-                foreach($location as $item) {
435
+                foreach ($location as $item) {
436 436
                     if (!$this->validator->validLocation($item)) {
437 437
                         throw new ValidationException('location', $item);
438 438
                     }
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
                 throw new ValidationException('title', implode(' ', $title));
463 463
             } else {
464 464
                 $title = array_unique($title);
465
-                foreach($title as $item) {
465
+                foreach ($title as $item) {
466 466
                     if (!$this->validator->validTitle($item)) {
467 467
                         throw new ValidationException('title', $item);
468 468
                     }
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
         if (!$this->validator->validInclude($includeAttachments)) {
485 485
             throw new ValidationException('includeAttachments', $includeAttachments);
486 486
         } else {
487
-            if($includeAttachments) {
487
+            if ($includeAttachments) {
488 488
                 array_push($this->includes, 'attachments');
489 489
             }
490 490
         }
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
         if (!$this->validator->validInclude($includeLocation)) {
494 494
             throw new ValidationException('includeLocation', $includeLocation);
495 495
         } else {
496
-            if($includeLocation) {
496
+            if ($includeLocation) {
497 497
                 array_push($this->includes, 'location');
498 498
             }
499 499
         }
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
         if (!$this->validator->validInclude($includeTickets)) {
503 503
             throw new ValidationException('includeTickets', $includeTickets);
504 504
         } else {
505
-            if($includeTickets) {
505
+            if ($includeTickets) {
506 506
                 array_push($this->includes, 'tickets');
507 507
             }
508 508
         }
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
         if (!$this->validator->validInclude($includeTicketsEvents)) {
512 512
             throw new ValidationException('includeTicketsEvents', $includeTicketsEvents);
513 513
         } else {
514
-            if($includeTicketsEvents) {
514
+            if ($includeTicketsEvents) {
515 515
                 array_push($this->includes, 'tickets.events');
516 516
             }
517 517
         }
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
         if (!$this->validator->validInclude($includeTicketsClassPasses)) {
521 521
             throw new ValidationException('includeTicketsClassPasses', $includeTicketsClassPasses);
522 522
         } else {
523
-            if($includeTicketsClassPasses) {
523
+            if ($includeTicketsClassPasses) {
524 524
                 array_push($this->includes, 'tickets.class_passes');
525 525
             }
526 526
         }
Please login to merge, or discard this patch.
src/Responses/Events/RetrieveResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public static function from(array $attributes, $included = []): self
51 51
     {
52
-        if(empty($included)) {
52
+        if (empty($included)) {
53 53
             $location = LocationsRetrieveResponse::from([
54 54
                 'attributes' => [
55 55
                     'address_text' => null,
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 'id' => $attributes['relationships']['location']['data']['id']
75 75
             ]);
76 76
             foreach ($included as $includedData) {
77
-                if($includedData['type'] === 'location' && $includedData['id'] = $attributes['relationships']['location']['data']['id']) {
77
+                if ($includedData['type'] === 'location' && $includedData['id'] = $attributes['relationships']['location']['data']['id']) {
78 78
                     $location = LocationsRetrieveResponse::from($includedData);
79 79
                 }
80 80
             }
Please login to merge, or discard this patch.