Skip to content

Docs: various minor fixes #1037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Tokenizers/PHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class PHP extends Tokenizer
* from the scopeOpeners array. The data is duplicated here to
* save time during parsing of the file.
*
* @var array
* @var array<int|string, int|string>
*/
public $endScopeTokens = [
T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
Expand Down
2 changes: 1 addition & 1 deletion src/Tokenizers/Tokenizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ abstract class Tokenizer
/**
* A list of tokens that end the scope.
*
* @var array
* @var array<int|string, int|string>
*/
public $endScopeTokens = [];

Expand Down
4 changes: 2 additions & 2 deletions src/Util/Tokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,13 +752,13 @@ final class Tokens


/**
* Given a token, returns the name of the token.
* Given a token constant, returns the name of the token.
*
* If passed an integer, the token name is sourced from PHP's token_name()
* function. If passed a string, it is assumed to be a PHPCS-supplied token
* that begins with PHPCS_T_, so the name is sourced from the token value itself.
*
* @param int|string $token The token to get the name for.
* @param int|string $token The token constant to get the name for.
*
* @return string
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/Core/AbstractMethodUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ public function getTargetToken($commentString, $tokenType, $tokenContent=null)
*
* @return int
*
* @throws Exception When the test delimiter comment is not found.
* @throws Exception When the test target token is not found.
* @throws \Exception When the test delimiter comment is not found.
* @throws \Exception When the test target token is not found.
*/
public static function getTargetTokenFromFile(File $phpcsFile, $commentString, $tokenType, $tokenContent=null)
{
Expand Down