@@ -39,7 +39,7 @@ |
||
| 39 | 39 | /** |
| 40 | 40 | * {@inheritDoc} |
| 41 | 41 | */ |
| 42 | - public function requestObject(Payload $payload): array|string |
|
| 42 | + public function requestObject(Payload $payload): array | string |
|
| 43 | 43 | { |
| 44 | 44 | $request = $payload->toRequest($this->baseUri, $this->headers, $this->queryParams); |
| 45 | 45 | |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | $eventTickets = []; |
| 261 | 261 | |
| 262 | 262 | // attachments |
| 263 | - if($attachments) { |
|
| 263 | + if ($attachments) { |
|
| 264 | 264 | foreach ($event->attachments as $eventAttachment) { |
| 265 | 265 | $attachment = $this->client->attachments()->retrieve($eventAttachment['id']); |
| 266 | 266 | array_push($eventAttachments, new Attachment( |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | // location |
| 274 | 274 | // @todo resolve dynamic type |
| 275 | - if(!$location) { |
|
| 275 | + if (!$location) { |
|
| 276 | 276 | $eventLocation = new Location( |
| 277 | 277 | null, |
| 278 | 278 | null, |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | // tickets |
| 296 | - if($tickets) { |
|
| 296 | + if ($tickets) { |
|
| 297 | 297 | foreach ($event->tickets as $eventTicket) { |
| 298 | 298 | $ticket = $this->client->tickets()->retrieve($eventTicket['id']); |
| 299 | 299 | array_push($eventTickets, new Ticket( |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | throw new ValidationException('detail', implode(' ', $detail)); |
| 371 | 371 | } else { |
| 372 | 372 | $detail = array_unique($detail); |
| 373 | - foreach($detail as $item) { |
|
| 373 | + foreach ($detail as $item) { |
|
| 374 | 374 | if (!$this->validator->validLocation($item)) { |
| 375 | 375 | throw new ValidationException('detail', $item); |
| 376 | 376 | } |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | throw new ValidationException('location', implode(' ', $title)); |
| 398 | 398 | } else { |
| 399 | 399 | $location = array_unique($location); |
| 400 | - foreach($location as $item) { |
|
| 400 | + foreach ($location as $item) { |
|
| 401 | 401 | if (!$this->validator->validLocation($item)) { |
| 402 | 402 | throw new ValidationException('location', $item); |
| 403 | 403 | } |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | throw new ValidationException('title', implode(' ', $title)); |
| 428 | 428 | } else { |
| 429 | 429 | $title = array_unique($title); |
| 430 | - foreach($title as $item) { |
|
| 430 | + foreach ($title as $item) { |
|
| 431 | 431 | if (!$this->validator->validTitle($item)) { |
| 432 | 432 | throw new ValidationException('title', $item); |
| 433 | 433 | } |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | if (!$this->validator->validInclude($includeAttachments)) { |
| 450 | 450 | throw new ValidationException('includeAttachments', $includeAttachments); |
| 451 | 451 | } else { |
| 452 | - if($includeAttachments) { |
|
| 452 | + if ($includeAttachments) { |
|
| 453 | 453 | array_push($this->includes, 'attachments'); |
| 454 | 454 | } |
| 455 | 455 | } |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | if (!$this->validator->validInclude($includeLocation)) { |
| 459 | 459 | throw new ValidationException('includeLocation', $includeLocation); |
| 460 | 460 | } else { |
| 461 | - if($includeLocation) { |
|
| 461 | + if ($includeLocation) { |
|
| 462 | 462 | array_push($this->includes, 'location'); |
| 463 | 463 | } |
| 464 | 464 | } |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | if (!$this->validator->validInclude($includeTickets)) { |
| 468 | 468 | throw new ValidationException('includeTickets', $includeTickets); |
| 469 | 469 | } else { |
| 470 | - if($includeTickets) { |
|
| 470 | + if ($includeTickets) { |
|
| 471 | 471 | array_push($this->includes, 'tickets'); |
| 472 | 472 | } |
| 473 | 473 | } |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | if (!$this->validator->validInclude($includeTicketsEvents)) { |
| 477 | 477 | throw new ValidationException('includeTicketsEvents', $includeTicketsEvents); |
| 478 | 478 | } else { |
| 479 | - if($includeTickets) { |
|
| 479 | + if ($includeTickets) { |
|
| 480 | 480 | array_push($this->includes, 'tickets.events'); |
| 481 | 481 | } |
| 482 | 482 | } |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | if (!$this->validator->validInclude($includeTicketsClassPasses)) { |
| 486 | 486 | throw new ValidationException('includeTicketsClassPasses', $includeTicketsClassPasses); |
| 487 | 487 | } else { |
| 488 | - if($includeTicketsClassPasses) { |
|
| 488 | + if ($includeTicketsClassPasses) { |
|
| 489 | 489 | array_push($this->includes, 'tickets.class_passes'); |
| 490 | 490 | } |
| 491 | 491 | } |
@@ -75,17 +75,15 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | private array $includes = []; |
| 77 | 77 | /** |
| 78 | - |
|
| 79 | 78 | */ |
| 80 | 79 | public Ticket $ticket; |
| 81 | 80 | |
| 82 | 81 | /** |
| 83 | - |
|
| 84 | 82 | */ |
| 85 | 83 | public array $tickets = []; |
| 86 | 84 | |
| 87 | 85 | /** |
| 88 | - * |
|
| 86 | + * |
|
| 89 | 87 | */ |
| 90 | 88 | public $locations = []; |
| 91 | 89 | |
@@ -588,11 +586,11 @@ discard block |
||
| 588 | 586 | $this->logging = $level; |
| 589 | 587 | } |
| 590 | 588 | |
| 591 | - /** |
|
| 592 | - * Sets the token for all future new instances |
|
| 593 | - * @deprecated |
|
| 594 | - * @param $token string The API access token, as obtained on diffbot.com/dev. |
|
| 595 | - */ |
|
| 589 | + /** |
|
| 590 | + * Sets the token for all future new instances |
|
| 591 | + * @deprecated |
|
| 592 | + * @param $token string The API access token, as obtained on diffbot.com/dev. |
|
| 593 | + */ |
|
| 596 | 594 | public static function setToken($token) |
| 597 | 595 | { |
| 598 | 596 | $validator = new Validator(); |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | public readonly null | string $additionalInfo = null, |
| 15 | 15 | public readonly string $id, |
| 16 | 16 | public readonly float | null $latitude = null, |
| 17 | - public readonly float| null $longitude = null, |
|
| 17 | + public readonly float | null $longitude = null, |
|
| 18 | 18 | public readonly null | string $mapUrl = null, |
| 19 | 19 | public readonly int | null $zoom = null |
| 20 | 20 | ) { |
@@ -130,10 +130,10 @@ |
||
| 130 | 130 | |
| 131 | 131 | $body = null; |
| 132 | 132 | |
| 133 | - $uri = $baseUri->toString().$this->uri->toString(); |
|
| 133 | + $uri = $baseUri->toString() . $this->uri->toString(); |
|
| 134 | 134 | |
| 135 | - if (! empty($this->parameters)) { |
|
| 136 | - $uri .= '?'.http_build_query($this->parameters); |
|
| 135 | + if (!empty($this->parameters)) { |
|
| 136 | + $uri .= '?' . http_build_query($this->parameters); |
|
| 137 | 137 | } |
| 138 | 138 | //die($uri); |
| 139 | 139 | $request = $psr17Factory->createRequest($this->method->value, $uri); |