diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-09-13 21:44:30 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-09-13 21:44:30 +0200 |
commit | 11932a471b4ef10faf76b6fcfe30a35f946eb7ab (patch) | |
tree | cde92c5eceef8991033fe7773ab60da51e289af4 /tests | |
parent | d7d74d0a714f29515da85078cc826ba49d2913b9 (diff) | |
download | ste-11932a471b4ef10faf76b6fcfe30a35f946eb7ab.tar.gz ste-11932a471b4ef10faf76b6fcfe30a35f946eb7ab.tar.bz2 ste-11932a471b4ef10faf76b6fcfe30a35f946eb7ab.zip |
Use short array syntax
We can use it now that we switched to PHP 7.3
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/test_array/Test.php | 12 | ||||
-rw-r--r-- | tests/functional/test_foreach/Test.php | 10 | ||||
-rw-r--r-- | tests/functional/test_short_for_additional_attribs/Test.php | 10 | ||||
-rw-r--r-- | tests/functional/test_static_numeric_array_access/Test.php | 4 | ||||
-rw-r--r-- | tests/functional/test_tagname/Test.php | 4 | ||||
-rw-r--r-- | tests/functional/test_trailing_closing_array_bracket/Test.php | 4 |
6 files changed, 22 insertions, 22 deletions
diff --git a/tests/functional/test_array/Test.php b/tests/functional/test_array/Test.php index 58f0cb8..85d0217 100644 --- a/tests/functional/test_array/Test.php +++ b/tests/functional/test_array/Test.php @@ -14,14 +14,14 @@ class Test extends BaseTest protected function setUpSte(STECore $ste): void { - $ste->vars["foo"] = array( - "a" => array( + $ste->vars["foo"] = [ + "a" => [ "blabla" => "OK" - ), + ], "b" => "bla" - ); - $ste->vars["bar"] = array( + ]; + $ste->vars["bar"] = [ "baz" => "a" - ); + ]; } } diff --git a/tests/functional/test_foreach/Test.php b/tests/functional/test_foreach/Test.php index 3f8cc73..2fc3d91 100644 --- a/tests/functional/test_foreach/Test.php +++ b/tests/functional/test_foreach/Test.php @@ -14,10 +14,10 @@ class Test extends BaseTest protected function setUpSte(STECore $ste): void { - $ste->vars["foo"] = array( - "a" => array("a" => 100, "b" => 200), - "b" => array("a" => 1, "b" => 2), - "c" => array("a" => 42, "b" => 1337) - ); + $ste->vars["foo"] = [ + "a" => ["a" => 100, "b" => 200], + "b" => ["a" => 1, "b" => 2], + "c" => ["a" => 42, "b" => 1337] + ]; } } diff --git a/tests/functional/test_short_for_additional_attribs/Test.php b/tests/functional/test_short_for_additional_attribs/Test.php index 8099869..e0e0934 100644 --- a/tests/functional/test_short_for_additional_attribs/Test.php +++ b/tests/functional/test_short_for_additional_attribs/Test.php @@ -14,10 +14,10 @@ class Test extends BaseTest protected function setUpSte(STECore $ste): void { - $ste->set_var_by_name("data", array( - array('content' => 'foo', 'foo' => true), - array('content' => 'bar', 'foo' => false), - array('content' => 'baz', 'foo' => false), - )); + $ste->set_var_by_name("data", [ + ['content' => 'foo', 'foo' => true], + ['content' => 'bar', 'foo' => false], + ['content' => 'baz', 'foo' => false], + ]); } } diff --git a/tests/functional/test_static_numeric_array_access/Test.php b/tests/functional/test_static_numeric_array_access/Test.php index 0c6a853..150b74a 100644 --- a/tests/functional/test_static_numeric_array_access/Test.php +++ b/tests/functional/test_static_numeric_array_access/Test.php @@ -14,10 +14,10 @@ class Test extends BaseTest protected function setUpSte(STECore $ste): void { - $ste->set_var_by_name("foo", array( + $ste->set_var_by_name("foo", [ "foo", "bar", "baz", - )); + ]); } } diff --git a/tests/functional/test_tagname/Test.php b/tests/functional/test_tagname/Test.php index 8e3d8f6..38f26c2 100644 --- a/tests/functional/test_tagname/Test.php +++ b/tests/functional/test_tagname/Test.php @@ -14,12 +14,12 @@ class Test extends BaseTest protected function setUpSte(STECore $ste): void { - $names = array( + $names = [ "foo", "ab_cd", "foo123baz", "x0123", - ); + ]; foreach ($names as $name) { $ste->register_tag( diff --git a/tests/functional/test_trailing_closing_array_bracket/Test.php b/tests/functional/test_trailing_closing_array_bracket/Test.php index 9e6ff2c..a24f93c 100644 --- a/tests/functional/test_trailing_closing_array_bracket/Test.php +++ b/tests/functional/test_trailing_closing_array_bracket/Test.php @@ -14,10 +14,10 @@ class Test extends BaseTest protected function setUpSte(STECore $ste): void { - $ste->set_var_by_name("foo", array( + $ste->set_var_by_name("foo", [ "foo", "bar", "baz", - )); + ]); } } |