@@ -100,7 +100,7 @@ |
||
| 100 | 100 | */ |
| 101 | 101 | public function has(string $id): bool |
| 102 | 102 | { |
| 103 | - return isset($this->services[$id]) || method_exists($this, 'create' . ucfirst($id)); |
|
| 103 | + return isset($this->services[$id]) || method_exists($this, 'create'.ucfirst($id)); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | return $this->getPerformancesBetween($start, $end); |
| 30 | 30 | } catch (Throwable $e) { |
| 31 | - throw new Exception("Unable to get upcoming performances: " . $e->getMessage()); |
|
| 31 | + throw new Exception("Unable to get upcoming performances: ".$e->getMessage()); |
|
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | public function getPerformancesForProductionSeason(int $psId): array |
| 60 | 60 | { |
| 61 | 61 | return $this->search([ |
| 62 | - 'ProductionSeasonIds' => (string)$psId, |
|
| 62 | + 'ProductionSeasonIds' => (string) $psId, |
|
| 63 | 63 | ]); |
| 64 | 64 | } |
| 65 | 65 | |
@@ -23,5 +23,5 @@ |
||
| 23 | 23 | * @param mixed[] $args |
| 24 | 24 | * @return mixed[]|Exception |
| 25 | 25 | */ |
| 26 | - public function post(string $endpoint, array $args = []): array|Exception; |
|
| 26 | + public function post(string $endpoint, array $args = []): array | Exception; |
|
| 27 | 27 | } |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | $response = $this->client->get(self::RESOURCE); |
| 49 | 49 | $data = json_decode($response->getBody()->getContents(), true); |
| 50 | 50 | |
| 51 | - return array_map(function (array $season) { |
|
| 51 | + return array_map(function(array $season) { |
|
| 52 | 52 | return new Season($season); |
| 53 | 53 | }, $data); |
| 54 | 54 | } catch (GuzzleException $e) { |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | /** |
| 35 | 35 | * @throws InvalidArgumentException |
| 36 | 36 | */ |
| 37 | - public function firstPerformanceDate(string $timezone = 'America/New_York'): DateTime|bool |
|
| 37 | + public function firstPerformanceDate(string $timezone = 'America/New_York'): DateTime | bool |
|
| 38 | 38 | { |
| 39 | 39 | try { |
| 40 | 40 | $timezone = new DateTimeZone($timezone); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | return $result; |
| 54 | 54 | } catch (Throwable $e) { |
| 55 | - throw new Exception("Unable to parse FirstPerformanceDate: " . $e->getMessage()); |
|
| 55 | + throw new Exception("Unable to parse FirstPerformanceDate: ".$e->getMessage()); |
|
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | /** |
| 63 | 63 | * @throws InvalidArgumentException |
| 64 | 64 | */ |
| 65 | - public function lastPerformanceDate(string $timezone = 'America/New_York'): DateTime|bool |
|
| 65 | + public function lastPerformanceDate(string $timezone = 'America/New_York'): DateTime | bool |
|
| 66 | 66 | { |
| 67 | 67 | try { |
| 68 | 68 | $timezone = new DateTimeZone($timezone); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | return $result; |
| 82 | 82 | } catch (Throwable $e) { |
| 83 | - throw new Exception("Unable to parse LastPerformanceDate: " . $e->getMessage()); |
|
| 83 | + throw new Exception("Unable to parse LastPerformanceDate: ".$e->getMessage()); |
|
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $cachedResponse = $this->cache->get($cacheKey); |
| 122 | 122 | |
| 123 | 123 | if ($cachedResponse !== null) { |
| 124 | - $this->logEvent('Cache hit for endpoint: ' . $endpoint); |
|
| 124 | + $this->logEvent('Cache hit for endpoint: '.$endpoint); |
|
| 125 | 125 | |
| 126 | 126 | return $cachedResponse; |
| 127 | 127 | } |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | if ($method === 'GET' && $this->cache) { |
| 142 | 142 | $cacheExpiration = $args['cache_expiration'] ?? self::CACHE_EXPIRATION_DEFAULT; |
| 143 | 143 | $this->cache->set($cacheKey, $data, $cacheExpiration); |
| 144 | - $this->logEvent('Cached response for endpoint: ' . $endpoint); |
|
| 144 | + $this->logEvent('Cached response for endpoint: '.$endpoint); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | return $data; |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | * @return Exception|mixed[] |
| 233 | 233 | * @throws GuzzleException |
| 234 | 234 | */ |
| 235 | - public function post(string $endpoint, array $args = []): array|Exception |
|
| 235 | + public function post(string $endpoint, array $args = []): array | Exception |
|
| 236 | 236 | { |
| 237 | 237 | |
| 238 | 238 | $args = array_merge($args, [ |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | 'log' => 'tessitura', |
| 260 | 260 | ]); |
| 261 | 261 | |
| 262 | - $message = 'Tessitura API: ' . $message; |
|
| 262 | + $message = 'Tessitura API: '.$message; |
|
| 263 | 263 | |
| 264 | 264 | if ($this->getLogger()) { |
| 265 | 265 | $this->getLogger()->info($message, $args); |
@@ -399,6 +399,6 @@ discard block |
||
| 399 | 399 | 'args' => $keyArgs, |
| 400 | 400 | ]; |
| 401 | 401 | |
| 402 | - return 'tessitura:' . md5(json_encode($keyData)); |
|
| 402 | + return 'tessitura:'.md5(json_encode($keyData)); |
|
| 403 | 403 | } |
| 404 | 404 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | public function description(): string |
| 30 | 30 | { |
| 31 | - return (string)$this->extraArgs['PerformanceDescription']; |
|
| 31 | + return (string) $this->extraArgs['PerformanceDescription']; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function doorsOpen(): ?DateTime |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | |
| 19 | 19 | public function enabled(): bool |
| 20 | 20 | { |
| 21 | - return (bool)$this->extraArgs['Enabled']; |
|
| 21 | + return (bool) $this->extraArgs['Enabled']; |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | public function performanceId(): int |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | public function getDescription(): string |
| 34 | 34 | { |
| 35 | - return (string)$this->extraArgs()['Description']; |
|
| 35 | + return (string) $this->extraArgs()['Description']; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function setDescription(string $description): void |