From c8e975a0151c74ea731dc709640310222d884297 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 2 Oct 2023 18:01:05 +0200 Subject: Update Mustache to 46286a1 --- Mustache/Exception/InvalidArgumentException.php | 18 +++++++++++ Mustache/Exception/LogicException.php | 18 +++++++++++ Mustache/Exception/RuntimeException.php | 18 +++++++++++ Mustache/Exception/SyntaxException.php | 41 +++++++++++++++++++++++++ Mustache/Exception/UnknownFilterException.php | 38 +++++++++++++++++++++++ Mustache/Exception/UnknownHelperException.php | 38 +++++++++++++++++++++++ Mustache/Exception/UnknownTemplateException.php | 38 +++++++++++++++++++++++ 7 files changed, 209 insertions(+) create mode 100644 Mustache/Exception/InvalidArgumentException.php create mode 100644 Mustache/Exception/LogicException.php create mode 100644 Mustache/Exception/RuntimeException.php create mode 100644 Mustache/Exception/SyntaxException.php create mode 100644 Mustache/Exception/UnknownFilterException.php create mode 100644 Mustache/Exception/UnknownHelperException.php create mode 100644 Mustache/Exception/UnknownTemplateException.php (limited to 'Mustache/Exception') diff --git a/Mustache/Exception/InvalidArgumentException.php b/Mustache/Exception/InvalidArgumentException.php new file mode 100644 index 00000000..becf2ed1 --- /dev/null +++ b/Mustache/Exception/InvalidArgumentException.php @@ -0,0 +1,18 @@ +token = $token; + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + parent::__construct($msg, 0, $previous); + } else { + parent::__construct($msg); // @codeCoverageIgnore + } + } + + /** + * @return array + */ + public function getToken() + { + return $this->token; + } +} diff --git a/Mustache/Exception/UnknownFilterException.php b/Mustache/Exception/UnknownFilterException.php new file mode 100644 index 00000000..0651c173 --- /dev/null +++ b/Mustache/Exception/UnknownFilterException.php @@ -0,0 +1,38 @@ +filterName = $filterName; + $message = sprintf('Unknown filter: %s', $filterName); + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + parent::__construct($message, 0, $previous); + } else { + parent::__construct($message); // @codeCoverageIgnore + } + } + + public function getFilterName() + { + return $this->filterName; + } +} diff --git a/Mustache/Exception/UnknownHelperException.php b/Mustache/Exception/UnknownHelperException.php new file mode 100644 index 00000000..193be782 --- /dev/null +++ b/Mustache/Exception/UnknownHelperException.php @@ -0,0 +1,38 @@ +helperName = $helperName; + $message = sprintf('Unknown helper: %s', $helperName); + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + parent::__construct($message, 0, $previous); + } else { + parent::__construct($message); // @codeCoverageIgnore + } + } + + public function getHelperName() + { + return $this->helperName; + } +} diff --git a/Mustache/Exception/UnknownTemplateException.php b/Mustache/Exception/UnknownTemplateException.php new file mode 100644 index 00000000..32a778a5 --- /dev/null +++ b/Mustache/Exception/UnknownTemplateException.php @@ -0,0 +1,38 @@ +templateName = $templateName; + $message = sprintf('Unknown template: %s', $templateName); + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + parent::__construct($message, 0, $previous); + } else { + parent::__construct($message); // @codeCoverageIgnore + } + } + + public function getTemplateName() + { + return $this->templateName; + } +} -- cgit v1.2.3-55-g7522