Skip to content
Permalink
Browse files

Minor changes to internal apis

  • Loading branch information...
supergrecko committed Jun 1, 2019
1 parent 852bbb6 commit 96c66c871c1d0ed5bfda64e86102a08847fc9fd3
@@ -12,8 +12,6 @@
* Provides helper method to essential usages
* for the API.
*
* TODO: documentation
*
* @package RiotQuest\Support\Facades
*/
class Client extends Module
@@ -4,9 +4,8 @@
use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;
use Psr\SimpleCache\CacheInterface;
class CacheModel implements CacheInterface {
class CacheModel {
/**
* @var string
@@ -27,10 +26,11 @@ public function __construct()
}
/**
* @param string $key
* @param mixed $value
* @param $key
* @param $value
* @param null $ttl
* @return bool|void
* @throws \League\Flysystem\FileExistsException
* @throws \League\Flysystem\FileNotFoundException
*/
public function set($key, $value, $ttl = null)
{
@@ -43,47 +43,43 @@ public function set($key, $value, $ttl = null)
}
/**
* @param string $key
* @param $key
* @param null $default
* @return mixed|null
* @throws \League\Flysystem\FileNotFoundException
*/
public function get($key, $default = null)
{
return $this->exists($key) ? ($this->read($key)['data']) : $default;
}
public function delete($key)
{
// TODO: Implement delete() method.
}
public function clear()
{
// TODO: Implement clear() method.
}
/**
* @param $keys
* @param null $default
* @return array
*/
public function getMultiple($keys, $default = null)
{
return array_map(function ($e) use ($default) {
return $this->get($e, $default);
}, (array) $keys);
}
/**
* @param $values
* @param null $ttl
*/
public function setMultiple($values, $ttl = null)
{
foreach ($values as $key => $value) {
$this->set($key, $value, $ttl);
}
}
public function deleteMultiple($keys)
{
// TODO: Implement deleteMultiple() method.
}
/**
* @param string $key
* @param $key
* @return bool
* @throws \League\Flysystem\FileNotFoundException
*/
public function has($key)
{
@@ -35,7 +35,7 @@ class CurrentGameParticipant extends Collection
*/
public function getChampionIcon()
{
return Dragon::getChampionSquare($this->championId);
return Provider::getChampionSquare($this->championId);
}
/**
@@ -26,7 +26,6 @@ public function __construct()
/**
* Registers an API call to the cache
*
* @todo refactor
* @param $region
* @param string $endpoint
* @param string $key

0 comments on commit 96c66c8

Please sign in to comment.
You can’t perform that action at this time.