@@ -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 | /** |
@@ -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 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | public function description(): string |
| 31 | 31 | { |
| 32 | 32 | |
| 33 | - return (string)$this->_extraArgs['PerformanceDescription']; |
|
| 33 | + return (string) $this->_extraArgs['PerformanceDescription']; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | public function doorsOpen(): ?DateTime |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | |
| 21 | 21 | public function enabled(): bool |
| 22 | 22 | { |
| 23 | - return (bool)$this->_extraArgs['Enabled']; |
|
| 23 | + return (bool) $this->_extraArgs['Enabled']; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function performanceId(): int |
@@ -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) { |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | public function getDescription(): string |
| 30 | 30 | { |
| 31 | - return (string)$this->extraArgs()['Description']; |
|
| 31 | + return (string) $this->extraArgs()['Description']; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function getEndDateTime(string $timezone = 'America/New_York'): ?DateTime |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | // This helps encourage developers to use explicit getter methods |
| 74 | 74 | $commonMethods = ['id', 'name', 'description']; |
| 75 | 75 | if (in_array(strtolower($name), $commonMethods)) { |
| 76 | - $methodName = 'get' . ucfirst($name); |
|
| 76 | + $methodName = 'get'.ucfirst($name); |
|
| 77 | 77 | trigger_error( |
| 78 | 78 | "Magic method $name() is deprecated. Use explicit method $methodName() instead.", |
| 79 | 79 | E_USER_DEPRECATED |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | { |
| 141 | 141 | $name = $this->extraArgs()['name'] ?? ''; |
| 142 | 142 | |
| 143 | - return (string)$name; |
|
| 143 | + return (string) $name; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | /** |
@@ -152,6 +152,6 @@ discard block |
||
| 152 | 152 | { |
| 153 | 153 | $description = $this->extraArgs()['description'] ?? ''; |
| 154 | 154 | |
| 155 | - return (string)$description; |
|
| 155 | + return (string) $description; |
|
| 156 | 156 | } |
| 157 | 157 | } |
@@ -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 | |
| 157 | 157 | return $cachedResponse; |
| 158 | 158 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | if ($method === 'GET' && $this->_cache) { |
| 173 | 173 | $cacheExpiration = $args['cache_expiration'] ?? self::CACHE_EXPIRATION_DEFAULT; |
| 174 | 174 | $this->_cache->set($cacheKey, $data, $cacheExpiration); |
| 175 | - $this->logEvent('Cached response for endpoint: ' . $endpoint); |
|
| 175 | + $this->logEvent('Cached response for endpoint: '.$endpoint); |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | return $data; |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | * @return Exception|mixed[] |
| 271 | 271 | * @throws GuzzleException |
| 272 | 272 | */ |
| 273 | - public function post(string $endpoint, array $args = []): array|Exception |
|
| 273 | + public function post(string $endpoint, array $args = []): array | Exception |
|
| 274 | 274 | { |
| 275 | 275 | |
| 276 | 276 | $args = array_merge($args, [ |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | 'log' => 'tessitura', |
| 298 | 298 | ]); |
| 299 | 299 | |
| 300 | - $message = 'Tessitura API: ' . $message; |
|
| 300 | + $message = 'Tessitura API: '.$message; |
|
| 301 | 301 | |
| 302 | 302 | if ($this->getLogger()) { |
| 303 | 303 | $this->getLogger()->info($message, $args); |
@@ -442,6 +442,6 @@ discard block |
||
| 442 | 442 | 'args' => $keyArgs, |
| 443 | 443 | ]; |
| 444 | 444 | |
| 445 | - return 'tessitura:' . md5(json_encode($keyData)); |
|
| 445 | + return 'tessitura:'.md5(json_encode($keyData)); |
|
| 446 | 446 | } |
| 447 | 447 | } |
@@ -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 | |