Skip to content

Commit 238dbc9

Browse files
committed
Docs: BCTokens: list methods supported
The `BCTokens` class has a `__callStatic()` method to allow for offering methods for all properties from the PHPCS native `Tokens` array, even when they are unchanged. Using the `@method` tag, it is now documented which methods will magically resolve. Ref: https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#57-method
1 parent 2353f96 commit 238dbc9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

PHPCSUtils/BackCompat/BCTokens.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,22 @@
4040
* the token arrays returned by this class.
4141
*
4242
* @since 1.0.0
43+
*
44+
* @method static array blockOpeners() Tokens that open code blocks.
45+
* @method static array booleanOperators() Tokens that perform boolean operations.
46+
* @method static array bracketTokens() Tokens that represent brackets and parenthesis.
47+
* @method static array castTokens() Tokens that represent type casting.
48+
* @method static array commentTokens() Tokens that are comments.
49+
* @method static array emptyTokens() Tokens that don't represent code.
50+
* @method static array equalityTokens() Tokens that represent equality comparisons.
51+
* @method static array heredocTokens() Tokens that make up a heredoc string.
52+
* @method static array includeTokens() Tokens that include files.
53+
* @method static array methodPrefixes() Tokens that can prefix a method name.
54+
* @method static array scopeModifiers() Tokens that represent scope modifiers.
55+
* @method static array scopeOpeners() Tokens that are allowed to open scopes.
56+
* @method static array stringTokens() Tokens that represent strings.
57+
* Note that `T_STRINGS` are NOT represented in this list as this list
58+
* is about _text_ strings.
4359
*/
4460
class BCTokens
4561
{

0 commit comments

Comments
 (0)