From 88241c88e65bb0b9b0356b8bd01f765fb3e3530d Mon Sep 17 00:00:00 2001 From: Kei Date: Mon, 29 Jul 2024 02:52:03 +0700 Subject: [PATCH] test: `no_spaces_around_offset` --- tests/Fixtures/Ruleset/relax_actual.php | 6 ++++++ tests/Fixtures/Ruleset/relax_expected.php | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tests/Fixtures/Ruleset/relax_actual.php b/tests/Fixtures/Ruleset/relax_actual.php index 56e5272..9af437c 100644 --- a/tests/Fixtures/Ruleset/relax_actual.php +++ b/tests/Fixtures/Ruleset/relax_actual.php @@ -696,6 +696,12 @@ public function whitespace__no_extra_blank_lines_2() ]; } + public function whitespace__no_spaces_around_offset() + { + $b = ['a' => true, 'b' => false]; + $sample = $b [ 'a' ] [ 'b' ]; + } + public function whitespace__spaces_inside_parentheses() { if ( true ) { diff --git a/tests/Fixtures/Ruleset/relax_expected.php b/tests/Fixtures/Ruleset/relax_expected.php index 551a79b..72c6634 100644 --- a/tests/Fixtures/Ruleset/relax_expected.php +++ b/tests/Fixtures/Ruleset/relax_expected.php @@ -671,6 +671,12 @@ public function whitespace__no_extra_blank_lines_2() ]; } + public function whitespace__no_spaces_around_offset() + { + $b = ['a' => true, 'b' => false]; + $sample = $b['a']['b']; + } + public function whitespace__spaces_inside_parentheses() { if (true) {