Skip to content

Commit

Permalink
Merge pull request #4 from WyriHaximus/bump-down-to-psr-simple-cache-v2
Browse files Browse the repository at this point in the history
Bump down to psr/simple-cache v2
  • Loading branch information
WyriHaximus authored Aug 9, 2022
2 parents 889d837 + ecf32d8 commit 4129e50
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"require": {
"php": "^8.1",
"bentools/iterable-functions": "^2.0.1",
"psr/simple-cache": "^3.0",
"psr/simple-cache": "^2.0",
"react/async": "^4.0",
"react/cache": "^1.1",
"thecodingmachine/safe": "^2.2 || ^1.3"
Expand Down
28 changes: 14 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 16 additions & 7 deletions src/PSR16Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(
* @inheritDoc
* @phpstan-ignore-next-line
*/
public function get(string $key, mixed $default = null): mixed
public function get(string $key, mixed $default = null)
{
/**
* @psalm-suppress TooManyTemplateParams
Expand All @@ -35,7 +35,7 @@ public function get(string $key, mixed $default = null): mixed
* @inheritDoc
* @phpstan-ignore-next-line
*/
public function set(string $key, mixed $value, DateInterval|int|null $ttl = null): bool
public function set(string $key, mixed $value, DateInterval|int|null $ttl = null)
{
/**
* @var bool
Expand All @@ -44,7 +44,10 @@ public function set(string $key, mixed $value, DateInterval|int|null $ttl = null
return await($this->cache->set($key, $value, $this->convertToSeconds($ttl)));
}

public function delete(string $key): bool
/**
* @inheritDoc
*/
public function delete(string $key)
{
/**
* @var bool
Expand All @@ -53,7 +56,10 @@ public function delete(string $key): bool
return await($this->cache->delete($key));
}

public function clear(): bool
/**
* @inheritDoc
*/
public function clear()
{
/**
* @var bool
Expand Down Expand Up @@ -81,7 +87,7 @@ public function getMultiple(iterable $keys, mixed $default = null): iterable
* @inheritDoc
* @phpstan-ignore-next-line
*/
public function setMultiple(iterable $values, DateInterval|int|null $ttl = null): bool
public function setMultiple(iterable $values, DateInterval|int|null $ttl = null)
{
/**
* @var bool
Expand All @@ -94,7 +100,7 @@ public function setMultiple(iterable $values, DateInterval|int|null $ttl = null)
/**
* @inheritDoc
*/
public function deleteMultiple(iterable $keys): bool
public function deleteMultiple(iterable $keys)
{
/**
* @var bool
Expand All @@ -105,7 +111,10 @@ public function deleteMultiple(iterable $keys): bool
return await($this->cache->deleteMultiple(iterable_to_array($keys)));
}

public function has(string $key): bool
/**
* @inheritDoc
*/
public function has(string $key)
{
/**
* @var bool
Expand Down

0 comments on commit 4129e50

Please sign in to comment.