summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2018-09-04 03:06:38 -0400
committerPaul Duncan <pabs@pablotron.org>2018-09-04 03:06:38 -0400
commita5e1d27ceeaafcba1bcc44a14739d8f2eb84abd3 (patch)
tree179709c9a1f2e97d496fe0266dee85b6ab58bb03
parent8bd5bf4afd83384bd091ad992d397b9f43c8cea0 (diff)
downloadluigi-template-a5e1d27ceeaafcba1bcc44a14739d8f2eb84abd3.tar.bz2
luigi-template-a5e1d27ceeaafcba1bcc44a14739d8f2eb84abd3.zip
php: fix typos
-rw-r--r--php/src/Template.php10
1 files changed, 5 insertions, 5 deletions
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 {