@@ -50,7 +50,7 @@ |
||
| 50 | 50 | $response = $this->client->get(self::RESOURCE); |
| 51 | 51 | $data = json_decode($response->getBody()->getContents(), true); |
| 52 | 52 | |
| 53 | - return array_map( function(array $season) { |
|
| 53 | + return array_map(function(array $season) { |
|
| 54 | 54 | return new Season($season); |
| 55 | 55 | }, $data); |
| 56 | 56 | } catch (GuzzleException $e) { |
@@ -23,5 +23,5 @@ |
||
| 23 | 23 | * @param array $args |
| 24 | 24 | * @return array|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 | } |
| 28 | 28 | \ No newline at end of file |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | public function description(): string |
| 32 | 32 | { |
| 33 | 33 | |
| 34 | - return (string)$this->_extraArgs['PerformanceDescription']; |
|
| 34 | + return (string) $this->_extraArgs['PerformanceDescription']; |
|
| 35 | 35 | |
| 36 | 36 | } |
| 37 | 37 | |
@@ -15,13 +15,13 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function zoneId() : int { |
| 17 | 17 | |
| 18 | - return intval( $this->_extraArgs['ZoneId'] ); |
|
| 18 | + return intval($this->_extraArgs['ZoneId']); |
|
| 19 | 19 | |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | public function enabled(): bool |
| 23 | 23 | { |
| 24 | - return (bool)$this->_extraArgs['Enabled']; |
|
| 24 | + return (bool) $this->_extraArgs['Enabled']; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public function performanceId(): int |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | public function getDescription(): string |
| 28 | 28 | { |
| 29 | - return (string)$this->extraArgs()['Description']; |
|
| 29 | + return (string) $this->extraArgs()['Description']; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | public function getEndDateTime(string $timezone = 'America/New_York') : ?DateTime |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $cachedResponse = $this->_cache->get($cacheKey); |
| 153 | 153 | |
| 154 | 154 | if ($cachedResponse !== null) { |
| 155 | - $this->logEvent('Cache hit for endpoint: ' . $endpoint); |
|
| 155 | + $this->logEvent('Cache hit for endpoint: '.$endpoint); |
|
| 156 | 156 | return $cachedResponse; |
| 157 | 157 | } |
| 158 | 158 | } |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | if ($method === 'GET' && $this->_cache) { |
| 175 | 175 | $cacheExpiration = $args['cache_expiration'] ?? self::CACHE_EXPIRATION_DEFAULT; |
| 176 | 176 | $this->_cache->set($cacheKey, $data, $cacheExpiration); |
| 177 | - $this->logEvent('Cached response for endpoint: ' . $endpoint); |
|
| 177 | + $this->logEvent('Cached response for endpoint: '.$endpoint); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | return $data; |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | * @return Exception|mixed[] |
| 268 | 268 | * @throws GuzzleException |
| 269 | 269 | */ |
| 270 | - public function post(string $endpoint, array $args = []): array|Exception |
|
| 270 | + public function post(string $endpoint, array $args = []): array | Exception |
|
| 271 | 271 | { |
| 272 | 272 | |
| 273 | 273 | $args = array_merge($args, array( |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | 'log' => 'tessitura', |
| 296 | 296 | )); |
| 297 | 297 | |
| 298 | - $message = 'Tessitura API: ' . $message; |
|
| 298 | + $message = 'Tessitura API: '.$message; |
|
| 299 | 299 | |
| 300 | 300 | if ($this->getLogger()) { |
| 301 | 301 | $this->getLogger()->info($message, $args); |
@@ -441,6 +441,6 @@ discard block |
||
| 441 | 441 | 'args' => $keyArgs |
| 442 | 442 | ]; |
| 443 | 443 | |
| 444 | - return 'tessitura:' . md5(json_encode($keyData)); |
|
| 444 | + return 'tessitura:'.md5(json_encode($keyData)); |
|
| 445 | 445 | } |
| 446 | 446 | } |
@@ -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 | * @throws InvalidArgumentException |
| 30 | 30 | */ |
| 31 | - public function first_performance_date(string $timezone = 'America/New_York'): DateTime|bool |
|
| 31 | + public function first_performance_date(string $timezone = 'America/New_York'): DateTime | bool |
|
| 32 | 32 | { |
| 33 | 33 | try { |
| 34 | 34 | $timezone = new DateTimeZone($timezone); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | return $result; |
| 46 | 46 | } catch (Throwable $e) { |
| 47 | - throw new Exception("Unable to parse FirstPerformanceDate: " . $e->getMessage()); |
|
| 47 | + throw new Exception("Unable to parse FirstPerformanceDate: ".$e->getMessage()); |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | /** |
| 55 | 55 | * @throws InvalidArgumentException |
| 56 | 56 | */ |
| 57 | - public function last_performance_date(string $timezone = 'America/New_York'): DateTime|bool |
|
| 57 | + public function last_performance_date(string $timezone = 'America/New_York'): DateTime | bool |
|
| 58 | 58 | { |
| 59 | 59 | try { |
| 60 | 60 | $timezone = new DateTimeZone($timezone); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | return $result; |
| 72 | 72 | } catch (Throwable $e) { |
| 73 | - throw new Exception("Unable to parse LastPerformanceDate: " . $e->getMessage()); |
|
| 73 | + throw new Exception("Unable to parse LastPerformanceDate: ".$e->getMessage()); |
|
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | |
@@ -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 | |