Skip to content

Commit 8eefd10

Browse files
committed
BCTokens: change property visibility
⚠️ Breaking Change ⚠️ The `$phpcsCommentTokensTypes`, `$ooScopeTokens`, `$textStringTokens` properties all had `protected` visibility. These properties are not intended to be used directly by implementing standards and with them being `protected`, they would only be accessible if the implementing standard would extend the `BCTokens` class, which doesn't really make sense as it only contains static method anyhow. So to make the intention clearer, these have now all be reclassified as `private` properties.
1 parent 09e0c0e commit 8eefd10

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PHPCSUtils/BackCompat/BCTokens.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class BCTokens
5151
*
5252
* @var string[]
5353
*/
54-
protected static $phpcsCommentTokensTypes = [
54+
private static $phpcsCommentTokensTypes = [
5555
'T_PHPCS_ENABLE',
5656
'T_PHPCS_DISABLE',
5757
'T_PHPCS_SET',
@@ -66,7 +66,7 @@ class BCTokens
6666
*
6767
* @var array <int|string> => <int|string>
6868
*/
69-
protected static $ooScopeTokens = [
69+
private static $ooScopeTokens = [
7070
\T_CLASS => \T_CLASS,
7171
\T_ANON_CLASS => \T_ANON_CLASS,
7272
\T_INTERFACE => \T_INTERFACE,
@@ -80,7 +80,7 @@ class BCTokens
8080
*
8181
* @var array <int|string> => <int|string>
8282
*/
83-
protected static $textStringTokens = [
83+
private static $textStringTokens = [
8484
\T_CONSTANT_ENCAPSED_STRING => \T_CONSTANT_ENCAPSED_STRING,
8585
\T_DOUBLE_QUOTED_STRING => \T_DOUBLE_QUOTED_STRING,
8686
\T_INLINE_HTML => \T_INLINE_HTML,

0 commit comments

Comments
 (0)