11<?php
22/**
3- * Tests the retokenization of the `default` keyword to T_MATCH_DEFAULT for PHP 8.0 match structures
4- * and makes sure that the tokenization of switch `T_DEFAULT` structures is not aversely affected.
3+ * Tests that switch "default" statements get scope indexes, while match "default" statements do not.
54 *
65 * @author Juliette Reinders Folmer <[email protected] > 76 * @copyright 2020-2021 Squiz Pty Ltd (ABN 77 084 670 600)
@@ -17,7 +16,7 @@ final class RecurseScopeMapDefaultKeywordConditionsTest extends AbstractTokenize
1716
1817
1918 /**
20- * Test the retokenization of the ` default` keyword for match structure to `T_MATCH_DEFAULT` .
19+ * Test that match " default" tokens does not get scope indexes .
2120 *
2221 * Note: Cases and default structures within a match structure do *NOT* get case/default scope
2322 * conditions, in contrast to case and default structures in switch control structures.
@@ -103,8 +102,7 @@ public static function dataMatchDefault()
103102
104103
105104 /**
106- * Verify that the retokenization of `T_DEFAULT` tokens in match constructs, doesn't negatively
107- * impact the tokenization of `T_DEFAULT` tokens in switch control structures.
105+ * Test that switch "default" tokens do get the scope indexes.
108106 *
109107 * Note: Cases and default structures within a switch control structure *do* get case/default scope
110108 * conditions.
@@ -220,9 +218,7 @@ public static function dataSwitchDefault()
220218
221219
222220 /**
223- * Verify that the retokenization of `T_DEFAULT` tokens in match constructs, doesn't negatively
224- * impact the tokenization of `T_STRING` tokens with the contents 'default' which aren't in
225- * actual fact the default keyword.
221+ * Test that a "default" keyword which is not a switch or match default, does not get the scope indexes.
226222 *
227223 * @param string $testMarker The comment prefacing the target token.
228224 * @param string $testContent The token content to look for.
0 commit comments