@@ -30,7 +30,7 @@ |
||
| 30 | 30 | /** |
| 31 | 31 | * Creates a new Query Params value object, with the newly added param, and the existing params. |
| 32 | 32 | */ |
| 33 | - public function withParam(string $name, string|int $value): self |
|
| 33 | + public function withParam(string $name, string | int $value): self |
|
| 34 | 34 | { |
| 35 | 35 | return new self([ |
| 36 | 36 | ...$this->params, |
@@ -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 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | private function makeStreamHandler(ClientInterface $client): Closure |
| 119 | 119 | { |
| 120 | - if (! is_null($this->streamHandler)) { |
|
| 120 | + if (!is_null($this->streamHandler)) { |
|
| 121 | 121 | return $this->streamHandler; |
| 122 | 122 | } |
| 123 | 123 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | return fn (RequestInterface $request): ResponseInterface => $client->sendRequest($request); // @phpstan-ignore-line |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - return function (RequestInterface $_): never { |
|
| 132 | + return function(RequestInterface $_): never { |
|
| 133 | 133 | throw new Exception('To use stream requests you must provide an stream handler closure via the OpenAI factory.'); |
| 134 | 134 | }; |
| 135 | 135 | } |
@@ -53,7 +53,6 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | - |
|
| 57 | 56 | */ |
| 58 | 57 | public function classPasses(): ClassPasses |
| 59 | 58 | { |
@@ -66,16 +65,14 @@ discard block |
||
| 66 | 65 | { |
| 67 | 66 | return new Events($this->transporter); |
| 68 | 67 | } |
| 69 | - /** |
|
| 70 | - |
|
| 71 | - */ |
|
| 68 | + /** |
|
| 69 | + */ |
|
| 72 | 70 | public function locations(): Locations |
| 73 | 71 | { |
| 74 | 72 | return new Locations($this->transporter); |
| 75 | 73 | } |
| 76 | 74 | /** |
| 77 | - |
|
| 78 | - */ |
|
| 75 | + */ |
|
| 79 | 76 | public function tickets(): Tickets |
| 80 | 77 | { |
| 81 | 78 | return new Tickets($this->transporter); |
@@ -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 | ) { |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | public static function from(array $attributes): self |
| 39 | 39 | { |
| 40 | 40 | $included = []; |
| 41 | - if(array_key_exists('included', $attributes)) { |
|
| 41 | + if (array_key_exists('included', $attributes)) { |
|
| 42 | 42 | $included = $attributes['included']; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -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 | } |
@@ -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 | |
| 139 | 139 | $request = $psr17Factory->createRequest($this->method->value, $uri); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | /** @var array{object: string, data: array<int, 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 */ |
| 26 | 26 | $result = $this->transporter->requestObject($payload); |
| 27 | 27 | |
| 28 | - if(!array_key_exists('included', $result)) { |
|
| 28 | + if (!array_key_exists('included', $result)) { |
|
| 29 | 29 | return ListResponse::from($result); |
| 30 | 30 | } else { |
| 31 | 31 | return ListResponse::from($result, $result['included']); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | /** @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 */ |
| 45 | 45 | $result = $this->transporter->requestObject($payload); |
| 46 | 46 | |
| 47 | - if(!array_key_exists('included', $result)) { |
|
| 47 | + if (!array_key_exists('included', $result)) { |
|
| 48 | 48 | return RetrieveResponse::from($result['data']); |
| 49 | 49 | } else { |
| 50 | 50 | return RetrieveResponse::from($result['data'], $result['included']); |