Skip to content

Commit b3ef928

Browse files
committed
Docs: various minor tweaks
...collected along the way.
1 parent 97e340e commit b3ef928

File tree

5 files changed

+11
-15
lines changed

5 files changed

+11
-15
lines changed

src/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@ public function processLongArgument($arg, $pos)
12991299
* @param string $argument The name of the argument which is being processed.
13001300
*
13011301
* @return array<string>
1302-
* @throws DeepExitException When any of the provided codes are not valid as sniff codes.
1302+
* @throws \PHP_CodeSniffer\Exceptions\DeepExitException When any of the provided codes are not valid as sniff codes.
13031303
*/
13041304
private function parseSniffCodes($input, $argument)
13051305
{

tests/Core/Tokenizers/Tokenizer/CreateParenthesisNestingMapDNFTypesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Tests the conversion of parentheses tokens to type parentheses tokens.
3+
* Tests the parenthesis indexes get set correctly.
44
*
55
* @author Juliette Reinders Folmer <[email protected]>
66
* @copyright 2024 PHPCSStandards and contributors

tests/Core/Tokenizers/Tokenizer/RecurseScopeMapCaseKeywordConditionsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Tests converting enum "case" to T_ENUM_CASE.
3+
* Tests that switch "case" statements get scope indexes, while enum "case" statements do not.
44
*
55
* @author Jaroslav Hanslík <[email protected]>
66
* @copyright 2021 Squiz Pty Ltd (ABN 77 084 670 600)
@@ -16,7 +16,7 @@ final class RecurseScopeMapCaseKeywordConditionsTest extends AbstractTokenizerTe
1616

1717

1818
/**
19-
* Test that the enum "case" is converted to T_ENUM_CASE.
19+
* Test that enum "case" tokens does not get scope indexes.
2020
*
2121
* @param string $testMarker The comment which prefaces the target token in the test file.
2222
*
@@ -64,7 +64,7 @@ public static function dataEnumCases()
6464

6565

6666
/**
67-
* Test that "case" that is not enum case is still tokenized as `T_CASE`.
67+
* Test that switch "case" tokens do get the scope indexes.
6868
*
6969
* @param string $testMarker The comment which prefaces the target token in the test file.
7070
* @param array<string, int|string> $expectedTokens The expected token codes for the scope opener/closer.
@@ -221,7 +221,7 @@ public static function dataNotEnumCases()
221221

222222

223223
/**
224-
* Test that "case" that is not enum case is still tokenized as `T_CASE`.
224+
* Test that a "case" keyword which is not a switch or enum case, does not get the scope indexes.
225225
*
226226
* @param string $testMarker The comment which prefaces the target token in the test file.
227227
*

tests/Core/Tokenizers/Tokenizer/RecurseScopeMapDefaultKeywordConditionsTest.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
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.

tests/Core/Util/Tokens/GetHighestWeightedTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testGetHighestWeightedToken($tokens, $expected)
4141
/**
4242
* Data provider.
4343
*
44-
* @return array<string, array<string, int|false|array<int|string>>
44+
* @return array<string, array<string, int|false|array<int|string>>>
4545
*/
4646
public static function dataGetHighestWeightedToken()
4747
{

0 commit comments

Comments
 (0)