From 9b2be1530dfe4296f7b2c56e7aedb9f12f7d52b3 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 20 Apr 2025 00:13:42 +0200 Subject: [PATCH 1/2] Docs: various minor fixes --- src/Util/Tokens.php | 4 ++-- tests/Core/AbstractMethodUnitTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Util/Tokens.php b/src/Util/Tokens.php index 73cf02ddd7..7cd5fc55ba 100644 --- a/src/Util/Tokens.php +++ b/src/Util/Tokens.php @@ -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 */ diff --git a/tests/Core/AbstractMethodUnitTest.php b/tests/Core/AbstractMethodUnitTest.php index 3418be498f..8a25016f03 100644 --- a/tests/Core/AbstractMethodUnitTest.php +++ b/tests/Core/AbstractMethodUnitTest.php @@ -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) { From 78ed7b859abc25d6d705516107da78572f44d022 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 20 Apr 2025 01:17:25 +0200 Subject: [PATCH 2/2] Docs: and some more minor fixes --- src/Tokenizers/PHP.php | 2 +- src/Tokenizers/Tokenizer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tokenizers/PHP.php b/src/Tokenizers/PHP.php index 73a0c4b4a8..a40fc1be42 100644 --- a/src/Tokenizers/PHP.php +++ b/src/Tokenizers/PHP.php @@ -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 */ public $endScopeTokens = [ T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, diff --git a/src/Tokenizers/Tokenizer.php b/src/Tokenizers/Tokenizer.php index b22de1cc16..fe3d05e83f 100644 --- a/src/Tokenizers/Tokenizer.php +++ b/src/Tokenizers/Tokenizer.php @@ -54,7 +54,7 @@ abstract class Tokenizer /** * A list of tokens that end the scope. * - * @var array + * @var array */ public $endScopeTokens = [];