From bfd4763b4f831ed9eccbdd4717c98b7d95999d2e Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Sun, 26 Apr 2020 16:48:01 +0200 Subject: Some simple code formatting - Expand tabs into spaces - Remove trailing whitespace - Get rid of closing `?>` tags --- tests/test.php | 24 ++++++++++++------------ tests/test_array/code.php | 18 +++++++++--------- tests/test_blocks/code.php | 2 +- tests/test_closure/code.php | 2 +- tests/test_escapes/code.php | 6 +++--- tests/test_foreach/code.php | 10 +++++----- tests/test_getset/code.php | 2 +- tests/test_loop/code.php | 2 +- tests/test_mktag/code.php | 2 +- tests/test_pseudotags/code.php | 2 +- tests/test_recursive/code.php | 2 +- tests/test_scoping/code.php | 2 +- tests/test_short/code.php | 2 +- tests/test_simple/code.php | 2 +- 14 files changed, 39 insertions(+), 39 deletions(-) (limited to 'tests') diff --git a/tests/test.php b/tests/test.php index ed45d3e..fcfac0e 100644 --- a/tests/test.php +++ b/tests/test.php @@ -6,18 +6,18 @@ require("code.php"); use \kch42\ste; class TestStorage implements ste\StorageAccess { - public function load($tpl, &$mode) { - $mode = ste\StorageAccess::MODE_SOURCE; - return file_get_contents($tpl); - } - - public function save($tpl, $data, $mode) { - if($mode != ste\StorageAccess::MODE_TRANSCOMPILED) { - return; - } - - file_put_contents("$tpl.transc.php", $data); - } + public function load($tpl, &$mode) { + $mode = ste\StorageAccess::MODE_SOURCE; + return file_get_contents($tpl); + } + + public function save($tpl, $data, $mode) { + if($mode != ste\StorageAccess::MODE_TRANSCOMPILED) { + return; + } + + file_put_contents("$tpl.transc.php", $data); + } } $ste = new ste\STECore(new TestStorage()); diff --git a/tests/test_array/code.php b/tests/test_array/code.php index 58601e2..1e02e20 100644 --- a/tests/test_array/code.php +++ b/tests/test_array/code.php @@ -1,13 +1,13 @@ vars["foo"] = array( - "a" => array( - "blabla" => "OK" - ), - "b" => "bla" - ); - $ste->vars["bar"] = array( - "baz" => "a" - ); + $ste->vars["foo"] = array( + "a" => array( + "blabla" => "OK" + ), + "b" => "bla" + ); + $ste->vars["bar"] = array( + "baz" => "a" + ); } diff --git a/tests/test_blocks/code.php b/tests/test_blocks/code.php index de8c553..2e68d2d 100644 --- a/tests/test_blocks/code.php +++ b/tests/test_blocks/code.php @@ -1,5 +1,5 @@ register_tag("my_echo", function($ste, $params, $sub) { - return $params["text"]; - }); + $ste->register_tag("my_echo", function($ste, $params, $sub) { + return $params["text"]; + }); } diff --git a/tests/test_foreach/code.php b/tests/test_foreach/code.php index 380ee69..1dc5ab9 100644 --- a/tests/test_foreach/code.php +++ b/tests/test_foreach/code.php @@ -1,9 +1,9 @@ vars["foo"] = array( - "a" => array("a" => 100, "b" => 200), - "b" => array("a" => 1, "b" => 2), - "c" => array("a" => 42, "b" => 1337) - ); + $ste->vars["foo"] = array( + "a" => array("a" => 100, "b" => 200), + "b" => array("a" => 1, "b" => 2), + "c" => array("a" => 42, "b" => 1337) + ); } diff --git a/tests/test_getset/code.php b/tests/test_getset/code.php index 19a7ecd..398686b 100644 --- a/tests/test_getset/code.php +++ b/tests/test_getset/code.php @@ -1,5 +1,5 @@ vars["foo"] = "bar"; + $ste->vars["foo"] = "bar"; } diff --git a/tests/test_loop/code.php b/tests/test_loop/code.php index de8c553..2e68d2d 100644 --- a/tests/test_loop/code.php +++ b/tests/test_loop/code.php @@ -1,5 +1,5 @@ mute_runtime_errors = false; + $ste->mute_runtime_errors = false; } diff --git a/tests/test_scoping/code.php b/tests/test_scoping/code.php index de8c553..2e68d2d 100644 --- a/tests/test_scoping/code.php +++ b/tests/test_scoping/code.php @@ -1,5 +1,5 @@ vars["foo"] = "World"; + $ste->vars["foo"] = "World"; } -- cgit v1.2.3-54-g00ecf