Skip to content

Commit

Permalink
fixed linter
Browse files Browse the repository at this point in the history
  • Loading branch information
gaokevin1 committed Jan 2, 2025
1 parent 1dedcba commit 926114d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class LaravelCache implements CacheInterface
public function set(string $key, $value, int $ttl = 3600): bool
{
// Laravel TTL is in minutes
return Cache::put($key, $value, $ttl / 60);
return Cache::put($key, $value, max(1, ceil($ttl / 60)));
}

public function delete(string $key): bool
Expand Down
2 changes: 1 addition & 1 deletion src/SDK/Cache/APCuCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public function delete(string $key): bool
{
return apcu_delete($key);
}
}
}
2 changes: 1 addition & 1 deletion src/SDK/Cache/CacheInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ interface CacheInterface
public function get(string $key);
public function set(string $key, $value, int $ttl = 3600): bool;
public function delete(string $key): bool;
}
}
23 changes: 0 additions & 23 deletions src/SDK/Cache/LaravelCache.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/SDK/Cache/NullCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public function delete(string $key): bool
{
return true;
}
}
}
2 changes: 1 addition & 1 deletion src/SDK/Exception/ValidationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ public static function forInvalidTokenType(string $tokenType): self
{
return new self(sprintf('%s: %s', self::MSG_INVALID_TOKEN_TYPE, $tokenType));
}
}
}

0 comments on commit 926114d

Please sign in to comment.