fix a bunch of lints

This commit is contained in:
Shish
2019-05-28 20:27:23 +01:00
parent 294f5845b1
commit 2396ae2ef9
34 changed files with 67 additions and 88 deletions

View File

@ -22,7 +22,7 @@ class NoCache implements CacheEngine
class MemcacheCache implements CacheEngine
{
/** @var \Memcache|null */
/** @var ?Memcache */
public $memcache=null;
public function __construct(string $args)
@ -50,7 +50,7 @@ class MemcacheCache implements CacheEngine
class MemcachedCache implements CacheEngine
{
/** @var \Memcached|null */
/** @var ?Memcached */
public $memcache=null;
public function __construct(string $args)
@ -169,6 +169,7 @@ class Cache
public function __construct(?string $dsn)
{
$matches = [];
$c = null;
if ($dsn && preg_match("#(.*)://(.*)#", $dsn, $matches)) {
if ($matches[1] == "memcache") {
$c = new MemcacheCache($matches[2]);