Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"php": ">=8.0",
"guzzlehttp/guzzle": ">=6.3.3",
"psr/log": ">=1",
"psr/simple-cache": "1.*|2.*",
"psr/simple-cache": "1.*|2.*|3.*",
"ext-json": "*"
},
"require-dev": {
Expand Down
16 changes: 8 additions & 8 deletions src/Cache/MemoryCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function getInstance(): MemoryCache
/**
* @inheritDoc
*/
public function get($key, $default = null)
public function get($key, $default = null): mixed
{
return $this->cache[$key] ?? $default;
}
Expand All @@ -38,7 +38,7 @@ public function get($key, $default = null)
* @param $ttl - Ignored since its in memory
* @return bool|void
*/
public function set($key, $value, $ttl = null)
public function set($key, $value, $ttl = null): bool
{
$this->cache[$key] = $value;
return true;
Expand All @@ -47,7 +47,7 @@ public function set($key, $value, $ttl = null)
/**
* @inheritDoc
*/
public function delete($key)
public function delete($key): bool
{
$return = false;
if ($this->has($key)) {
Expand All @@ -61,7 +61,7 @@ public function delete($key)
/**
* @inheritDoc
*/
public function clear()
public function clear(): bool
{
$this->cache = [];
return true;
Expand All @@ -70,7 +70,7 @@ public function clear()
/**
* @inheritDoc
*/
public function getMultiple($keys, $default = null)
public function getMultiple($keys, $default = null): iterable
{
$items = $default ?? [];
foreach ($keys as $key) {
Expand All @@ -89,7 +89,7 @@ public function getMultiple($keys, $default = null)
/**
* @inheritDoc
*/
public function setMultiple($values, $ttl = null)
public function setMultiple($values, $ttl = null): bool
{
foreach ($values as $key => $value) {
$this->set($key, $value, $ttl);
Expand All @@ -101,7 +101,7 @@ public function setMultiple($values, $ttl = null)
/**
* @inheritDoc
*/
public function deleteMultiple($keys)
public function deleteMultiple($keys): bool
{
$return = true;
foreach ($keys as $key) {
Expand All @@ -116,7 +116,7 @@ public function deleteMultiple($keys)
/**
* @inheritDoc
*/
public function has($key)
public function has($key): bool
{
return isset($this->cache[$key]);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoint/Traits/JsonHandlerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function configureJsonRequest(Request $request): Request
*/
public function getResponseContent(Response $response, bool $associative = true): mixed
{
if (!$this->_respContent) {
if (empty($this->_respContent)) {
$this->_respContent = $response->getBody()->getContents();
$response->getBody()->rewind();
}
Expand Down