From c52f1a3528a4acac197cd705f5a22e199b11a1cd Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Tue, 4 Sep 2018 21:06:22 -0400 Subject: php/src/Template.php: fix phan warnings --- php/src/Template.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'php/src/Template.php') diff --git a/php/src/Template.php b/php/src/Template.php index 7497509..da905d7 100644 --- a/php/src/Template.php +++ b/php/src/Template.php @@ -226,8 +226,6 @@ function parse_template(string $template) : array { }, []); } -namespace Luigi; - class Filters { public static $FILTERS = null; @@ -379,15 +377,14 @@ final class Cache implements \ArrayAccess { } } - public function offsetUnset($key) { - delete($this->lut[$key]); - delete($this->templates[$key]); + public function offsetUnset($key) : void { + unset($this->lut[$key]); + unset($this->templates[$key]); } - public function offsetSet($key, $val) : bool { - delete($this->lut[$key]); + public function offsetSet($key, $val) : void { + unset($this->lut[$key]); $this->templates[$key] = $val; - return isset($this->templates[$key]); } -- cgit v1.2.3