Skip to content

Commit

Permalink
Rename constant
Browse files Browse the repository at this point in the history
  • Loading branch information
fracsi committed Dec 15, 2023
1 parent aa9997c commit 57bffce
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/TailwindBinary.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
class TailwindBinary
{
private const VERSION = 'v3.3.5';
private const DEFAULT_VERSION = 'v3.3.5';
private HttpClientInterface $httpClient;

public function __construct(
Expand Down Expand Up @@ -94,9 +94,11 @@ private function getLatestVersion(): string
try {
$response = $this->httpClient->request('GET', 'https://api.github.com/repos/tailwindlabs/tailwindcss/releases/latest');

return $response->toArray()['name'] ?? self::VERSION;
return $response->toArray()['name'] ?? self::DEFAULT_VERSION
;
} catch (\Throwable) {
return self::VERSION;
return self::DEFAULT_VERSION
;
}
}

Expand Down

0 comments on commit 57bffce

Please sign in to comment.