Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1431740
StableCollections.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
StableCollections.php
View Options
<?php
/**
* PHPCSUtils, utility functions and classes for PHP_CodeSniffer sniff developers.
*
* @package PHPCSUtils
* @copyright 2019-2020 PHPCSUtils Contributors
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
* @link https://github.com/PHPCSStandards/PHPCSUtils
*/
namespace
PHPCSUtils\Internal
;
/**
* Stable collections of related tokens.
*
* The {@see \PHPCSUtils\Tokens\Collections} class contains a range of token collections for use by sniffs,
* some of which may change depending on the availability of a token in PHP/PHPCS.
* The contents of token collections may also vary based on the PHPCS version to allow for optimized sniffing.
*
* The functionality _within_ PHPCSUtils, however, should be stable and reliably testable, so for internal
* use, the most volatile token arrays are replicated here in stable versions to be used by the PHPCSUtils
* functions (and tests) internally.
*
* ---------------------------------------------------------------------------------------------
* This class is only intended for internal use by PHPCSUtils and is not part of the public API.
* This also means that it has no promise of backward compatibility.
*
* End-users should use the methods in the {@see \PHPCSUtils\Tokens\Collections} class instead.
* ---------------------------------------------------------------------------------------------
*
* @internal
*
* @since 1.0.0
*/
final
class
StableCollections
{
/**
* Tokens which can open a short array or short list (PHPCS cross-version compatible).
*
* This array will ALWAYS include the `T_OPEN_SQUARE_BRACKET` token to allow for handling
* intermittent tokenizer issues related to the retokenization to `T_OPEN_SHORT_ARRAY`.
*
* @internal
* @ignore This array is only for internal use by PHPCSUtils and is not part of the public API.
*
* @since 1.0.2
*
* @var array<int|string, int|string>
*/
public
static
$shortArrayListOpenTokensBC
=
[
\T_OPEN_SHORT_ARRAY
=>
\T_OPEN_SHORT_ARRAY
,
\T_OPEN_SQUARE_BRACKET
=>
\T_OPEN_SQUARE_BRACKET
,
];
/**
* Tokens which are used for short lists.
*
* This array will ALWAYS include the `T_OPEN_SQUARE_BRACKET` and `T_CLOSE_SQUARE_BRACKET` tokens
* to allow for handling intermittent tokenizer issues related to the retokenization to `T_OPEN_SHORT_ARRAY`.
*
* @internal
* @ignore This array is only for internal use by PHPCSUtils and is not part of the public API.
*
* @since 1.0.2
*
* @var array<int|string, int|string>
*/
public
static
$shortArrayListTokensBC
=
[
\T_OPEN_SHORT_ARRAY
=>
\T_OPEN_SHORT_ARRAY
,
\T_CLOSE_SHORT_ARRAY
=>
\T_CLOSE_SHORT_ARRAY
,
\T_OPEN_SQUARE_BRACKET
=>
\T_OPEN_SQUARE_BRACKET
,
\T_CLOSE_SQUARE_BRACKET
=>
\T_CLOSE_SQUARE_BRACKET
,
];
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 21:01 (1 d, 16 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a9/be/34424dee75a8cdc0f625c69d5a3c
Default Alt Text
StableCollections.php (2 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment