From f29b2fb6abe9283525615940c437d5bc262e3621 Mon Sep 17 00:00:00 2001 From: Grzegorz Szymaszek Date: Wed, 19 Feb 2020 17:21:50 +0100 Subject: [PATCH] The Options\Cache::instance property can be null The property can be either null or a non-empty string, it depends on the cache class being used. --- src/DoctrineModule/Options/Cache.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DoctrineModule/Options/Cache.php b/src/DoctrineModule/Options/Cache.php index 5ecd47da..81583908 100644 --- a/src/DoctrineModule/Options/Cache.php +++ b/src/DoctrineModule/Options/Cache.php @@ -38,7 +38,7 @@ class Cache extends AbstractOptions * Key to use for fetching the memcache, memcached, or redis instance from * the service locator. Used only with Memcache. Memcached, and Redis. * - * @var string + * @var null|string */ protected $instance = null; @@ -61,9 +61,9 @@ public function setInstance(string $instance) : self return $this; } - public function getInstance() : string + public function getInstance() : ?string { - return (string) $this->instance; + return $this->instance; } public function setNamespace(string $namespace) : self