From a5e1d27ceeaafcba1bcc44a14739d8f2eb84abd3 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Tue, 4 Sep 2018 03:06:38 -0400 Subject: php: fix typos --- php/src/Template.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'php/src/Template.php') diff --git a/php/src/Template.php b/php/src/Template.php index c91ce29..bb9e63e 100644 --- a/php/src/Template.php +++ b/php/src/Template.php @@ -94,7 +94,7 @@ final class TemplateFilter { abstract class Token { - public function run(RunContext $ctx) : string; + public abstract function run(RunContext &$ctx) : string; }; final class LiteralToken extends Token { @@ -104,7 +104,7 @@ final class LiteralToken extends Token { $this->val = $val; } - public function run(RunContext $ctx) : string { + public function run(RunContext &$ctx) : string { return $this->val; } }; @@ -229,7 +229,7 @@ function parse_template(string $template) : array { namespace Luigi; -var $FILTERS = [ +$FILTERS = [ 'h' => function($s) { return htmlspecialchars($v, ENT_QUOTES); }, @@ -341,7 +341,7 @@ final class Template { } }; -public function run( +function run( string $template, array $args = [], array $filters = [] @@ -367,7 +367,7 @@ final class Cache implements \ArrayAccess { public function offsetGet($key) { if (isset($this->lut[$key])) { return $this->lut[$key]; - } else if (isset($this->templates[$key]) { + } else if (isset($this->templates[$key])) { $this->lut[$key] = new Template($this->templates[$key], $this->filters); return $this->lut[$key]; } else { -- cgit v1.2.3