@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | // tickets |
| 67 | 67 | $tickets = []; |
| 68 | - foreach($attributes['relationships']['tickets']['data'] as $ticket) { |
|
| 68 | + foreach ($attributes['relationships']['tickets']['data'] as $ticket) { |
|
| 69 | 69 | array_push($tickets, TicketsRetrieveResponse::from([ |
| 70 | 70 | 'attributes' => [ |
| 71 | 71 | 'available' => null, |
@@ -86,17 +86,17 @@ discard block |
||
| 86 | 86 | ])); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - if(!empty($included)) { |
|
| 89 | + if (!empty($included)) { |
|
| 90 | 90 | foreach ($included as $includedData) { |
| 91 | - if($includedData['type'] === 'location' && $includedData['id'] = $location->id) { |
|
| 91 | + if ($includedData['type'] === 'location' && $includedData['id'] = $location->id) { |
|
| 92 | 92 | $location = LocationsRetrieveResponse::from($includedData); |
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | //tickets |
| 97 | - foreach($tickets as $index => $ticket) { |
|
| 97 | + foreach ($tickets as $index => $ticket) { |
|
| 98 | 98 | foreach ($included as $includedData) { |
| 99 | - if($includedData['type'] === 'ticket' && $includedData['id'] = $ticket->id) { |
|
| 99 | + if ($includedData['type'] === 'ticket' && $includedData['id'] = $ticket->id) { |
|
| 100 | 100 | $tickets[$index] = TicketsRetrieveResponse::from($includedData); |
| 101 | 101 | } |
| 102 | 102 | } |
@@ -257,7 +257,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | $eventAttachments = []; // deprecated |
| 304 | 304 | |
| 305 | 305 | // attachments |
| 306 | - if($includeAttachments) { |
|
| 306 | + if ($includeAttachments) { |
|
| 307 | 307 | // foreach ($event->attachments as $eventAttachment) { |
| 308 | 308 | // $attachment = $this->client->attachments()->retrieve($eventAttachment['id']); |
| 309 | 309 | // array_push($eventAttachments, new Attachment( |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | |
| 321 | 321 | // eventTickets |
| 322 | 322 | $eventTickets = []; |
| 323 | - foreach($event->tickets as $ticket) { |
|
| 323 | + foreach ($event->tickets as $ticket) { |
|
| 324 | 324 | array_push($eventTickets, new Ticket( |
| 325 | 325 | $ticket->available, |
| 326 | 326 | $ticket->availableFrom, |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | throw new ValidationException('detail', implode(' ', $detail)); |
| 403 | 403 | } else { |
| 404 | 404 | $detail = array_unique($detail); |
| 405 | - foreach($detail as $item) { |
|
| 405 | + foreach ($detail as $item) { |
|
| 406 | 406 | if (!$this->validator->validLocation($item)) { |
| 407 | 407 | throw new ValidationException('detail', $item); |
| 408 | 408 | } |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | throw new ValidationException('location', implode(' ', $title)); |
| 430 | 430 | } else { |
| 431 | 431 | $location = array_unique($location); |
| 432 | - foreach($location as $item) { |
|
| 432 | + foreach ($location as $item) { |
|
| 433 | 433 | if (!$this->validator->validLocation($item)) { |
| 434 | 434 | throw new ValidationException('location', $item); |
| 435 | 435 | } |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | throw new ValidationException('title', implode(' ', $title)); |
| 460 | 460 | } else { |
| 461 | 461 | $title = array_unique($title); |
| 462 | - foreach($title as $item) { |
|
| 462 | + foreach ($title as $item) { |
|
| 463 | 463 | if (!$this->validator->validTitle($item)) { |
| 464 | 464 | throw new ValidationException('title', $item); |
| 465 | 465 | } |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | if (!$this->validator->validInclude($includeAttachments)) { |
| 482 | 482 | throw new ValidationException('includeAttachments', $includeAttachments); |
| 483 | 483 | } else { |
| 484 | - if($includeAttachments) { |
|
| 484 | + if ($includeAttachments) { |
|
| 485 | 485 | array_push($this->includes, 'attachments'); |
| 486 | 486 | } |
| 487 | 487 | } |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | if (!$this->validator->validInclude($includeLocation)) { |
| 491 | 491 | throw new ValidationException('includeLocation', $includeLocation); |
| 492 | 492 | } else { |
| 493 | - if($includeLocation) { |
|
| 493 | + if ($includeLocation) { |
|
| 494 | 494 | array_push($this->includes, 'location'); |
| 495 | 495 | } |
| 496 | 496 | } |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | if (!$this->validator->validInclude($includeTickets)) { |
| 500 | 500 | throw new ValidationException('includeTickets', $includeTickets); |
| 501 | 501 | } else { |
| 502 | - if($includeTickets) { |
|
| 502 | + if ($includeTickets) { |
|
| 503 | 503 | array_push($this->includes, 'tickets'); |
| 504 | 504 | } |
| 505 | 505 | } |
@@ -508,7 +508,7 @@ discard block |
||
| 508 | 508 | if (!$this->validator->validInclude($includeTicketsEvents)) { |
| 509 | 509 | throw new ValidationException('includeTicketsEvents', $includeTicketsEvents); |
| 510 | 510 | } else { |
| 511 | - if($includeTicketsEvents) { |
|
| 511 | + if ($includeTicketsEvents) { |
|
| 512 | 512 | array_push($this->includes, 'tickets.events'); |
| 513 | 513 | } |
| 514 | 514 | } |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | if (!$this->validator->validInclude($includeTicketsClassPasses)) { |
| 518 | 518 | throw new ValidationException('includeTicketsClassPasses', $includeTicketsClassPasses); |
| 519 | 519 | } else { |
| 520 | - if($includeTicketsClassPasses) { |
|
| 520 | + if ($includeTicketsClassPasses) { |
|
| 521 | 521 | array_push($this->includes, 'tickets.class_passes'); |
| 522 | 522 | } |
| 523 | 523 | } |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | foreach ($events->data as $event) { |
| 528 | 528 | |
| 529 | 529 | $eventTickets = []; |
| 530 | - foreach($event->tickets as $ticket) { |
|
| 530 | + foreach ($event->tickets as $ticket) { |
|
| 531 | 531 | array_push($eventTickets, new Ticket( |
| 532 | 532 | $ticket->available, |
| 533 | 533 | $ticket->availableFrom, |