summaryrefslogtreecommitdiff
path: root/src/ste/ParseCompileError.php
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2020-04-26 16:48:01 +0200
committerLaria Carolin Chabowski <laria@laria.me>2020-04-26 16:48:01 +0200
commitbfd4763b4f831ed9eccbdd4717c98b7d95999d2e (patch)
tree73538562b347386a24e3b81f443a0b61309fe3de /src/ste/ParseCompileError.php
parent2464ac4fa63ccd169f36849a1f7372191066f305 (diff)
downloadste-bfd4763b4f831ed9eccbdd4717c98b7d95999d2e.tar.gz
ste-bfd4763b4f831ed9eccbdd4717c98b7d95999d2e.tar.bz2
ste-bfd4763b4f831ed9eccbdd4717c98b7d95999d2e.zip
Some simple code formatting
- Expand tabs into spaces - Remove trailing whitespace - Get rid of closing `?>` tags
Diffstat (limited to 'src/ste/ParseCompileError.php')
-rw-r--r--src/ste/ParseCompileError.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/ste/ParseCompileError.php b/src/ste/ParseCompileError.php
index 5ee37c7..33fd612 100644
--- a/src/ste/ParseCompileError.php
+++ b/src/ste/ParseCompileError.php
@@ -3,20 +3,20 @@
namespace kch42\ste;
class ParseCompileError extends \Exception {
- public $msg;
- public $tpl;
- public $off;
-
- public function __construct($msg, $tpl, $offset, $code = 0, $previous = NULL) {
- $this->msg = $msg;
- $this->tpl = $tpl;
- $this->off = $offset;
- $this->message = "$msg (Template $tpl, Offset $offset)";
- }
-
- public function rewrite($code) {
- $line = substr_count(str_replace("\r\n", "\n", substr($code, 0, $this->off)), "\n") + 1;
- $this->message = "{$this->msg} (Template {$this->tpl}, Line $line)";
- $this->is_rewritten = true;
- }
+ public $msg;
+ public $tpl;
+ public $off;
+
+ public function __construct($msg, $tpl, $offset, $code = 0, $previous = NULL) {
+ $this->msg = $msg;
+ $this->tpl = $tpl;
+ $this->off = $offset;
+ $this->message = "$msg (Template $tpl, Offset $offset)";
+ }
+
+ public function rewrite($code) {
+ $line = substr_count(str_replace("\r\n", "\n", substr($code, 0, $this->off)), "\n") + 1;
+ $this->message = "{$this->msg} (Template {$this->tpl}, Line $line)";
+ $this->is_rewritten = true;
+ }
}