Remove MODIFIER_ prefix from node dumps

These constants are now called Modifiers::PUBLIC rather than
Class_::MODIFIER_PUBLIC etc, so update the dumped name as well.
This commit is contained in:
Nikita Popov 2022-09-03 11:00:13 +02:00
parent a2608f0b74
commit f5b56a5c4c
26 changed files with 89 additions and 89 deletions

View File

@ -110,25 +110,25 @@ class NodeDumper {
protected function dumpFlags($flags) {
$strs = [];
if ($flags & Modifiers::PUBLIC) {
$strs[] = 'MODIFIER_PUBLIC';
$strs[] = 'PUBLIC';
}
if ($flags & Modifiers::PROTECTED) {
$strs[] = 'MODIFIER_PROTECTED';
$strs[] = 'PROTECTED';
}
if ($flags & Modifiers::PRIVATE) {
$strs[] = 'MODIFIER_PRIVATE';
$strs[] = 'PRIVATE';
}
if ($flags & Modifiers::ABSTRACT) {
$strs[] = 'MODIFIER_ABSTRACT';
$strs[] = 'ABSTRACT';
}
if ($flags & Modifiers::STATIC) {
$strs[] = 'MODIFIER_STATIC';
$strs[] = 'STATIC';
}
if ($flags & Modifiers::FINAL) {
$strs[] = 'MODIFIER_FINAL';
$strs[] = 'FINAL';
}
if ($flags & Modifiers::READONLY) {
$strs[] = 'MODIFIER_READONLY';
$strs[] = 'READONLY';
}
if ($strs) {

View File

@ -21,7 +21,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PROTECTED (2)
flags: PROTECTED (2)
type: null
props: array(
0: Stmt_PropertyProperty(

View File

@ -753,7 +753,7 @@ array(
3: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -913,7 +913,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -1421,7 +1421,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PRIVATE (4)
flags: PRIVATE (4)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -1438,7 +1438,7 @@ array(
1: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
byRef: false
name: Identifier(
name: __construct

View File

@ -95,7 +95,7 @@ array(
2: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_STATIC (8)
flags: STATIC (8)
byRef: false
name: Identifier(
name: list
@ -109,7 +109,7 @@ array(
3: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_STATIC (8)
flags: STATIC (8)
byRef: false
name: Identifier(
name: protected
@ -123,7 +123,7 @@ array(
4: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -137,7 +137,7 @@ array(
5: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -426,7 +426,7 @@ array(
method: Identifier(
name: throw
)
newModifier: MODIFIER_PROTECTED (2)
newModifier: PROTECTED (2)
newName: Identifier(
name: public
)
@ -440,7 +440,7 @@ array(
method: Identifier(
name: self
)
newModifier: MODIFIER_PROTECTED (2)
newModifier: PROTECTED (2)
newName: null
)
4: Stmt_TraitUseAdaptation_Alias(

View File

@ -143,7 +143,7 @@ array(
)
)
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
byRef: false
name: Identifier(
name: m
@ -195,7 +195,7 @@ array(
)
)
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: null
props: array(
0: Stmt_PropertyProperty(

View File

@ -11,7 +11,7 @@ array(
0: Stmt_Class(
attrGroups: array(
)
flags: MODIFIER_ABSTRACT (16)
flags: ABSTRACT (16)
name: Identifier(
name: A
)
@ -22,7 +22,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
byRef: false
name: Identifier(
name: a
@ -36,7 +36,7 @@ array(
1: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PUBLIC | MODIFIER_ABSTRACT (17)
flags: PUBLIC | ABSTRACT (17)
byRef: false
name: Identifier(
name: b

View File

@ -36,7 +36,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
byRef: false
name: Identifier(
name: test
@ -98,7 +98,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -177,7 +177,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
byRef: false
name: Identifier(
name: test

View File

@ -21,7 +21,7 @@ array(
0: Stmt_ClassConst(
attrGroups: array(
)
flags: MODIFIER_STATIC (8)
flags: STATIC (8)
consts: array(
0: Const(
name: Identifier(
@ -58,7 +58,7 @@ array(
0: Stmt_ClassConst(
attrGroups: array(
)
flags: MODIFIER_ABSTRACT (16)
flags: ABSTRACT (16)
consts: array(
0: Const(
name: Identifier(
@ -95,7 +95,7 @@ array(
0: Stmt_ClassConst(
attrGroups: array(
)
flags: MODIFIER_READONLY (64)
flags: READONLY (64)
consts: array(
0: Const(
name: Identifier(
@ -132,7 +132,7 @@ array(
0: Stmt_ClassConst(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
consts: array(
0: Const(
name: Identifier(

View File

@ -40,7 +40,7 @@ array(
1: Stmt_ClassConst(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
consts: array(
0: Const(
name: Identifier(
@ -55,7 +55,7 @@ array(
2: Stmt_ClassConst(
attrGroups: array(
)
flags: MODIFIER_PROTECTED (2)
flags: PROTECTED (2)
consts: array(
0: Const(
name: Identifier(
@ -70,7 +70,7 @@ array(
3: Stmt_ClassConst(
attrGroups: array(
)
flags: MODIFIER_PRIVATE (4)
flags: PRIVATE (4)
consts: array(
0: Const(
name: Identifier(
@ -85,7 +85,7 @@ array(
4: Stmt_ClassConst(
attrGroups: array(
)
flags: MODIFIER_FINAL (32)
flags: FINAL (32)
consts: array(
0: Const(
name: Identifier(

View File

@ -8,7 +8,7 @@ array(
0: Stmt_Class(
attrGroups: array(
)
flags: MODIFIER_FINAL (32)
flags: FINAL (32)
name: Identifier(
name: A
)

View File

@ -16,7 +16,7 @@ array(
0: Stmt_Class(
attrGroups: array(
)
flags: MODIFIER_ABSTRACT (16)
flags: ABSTRACT (16)
name: Identifier(
name: A
)
@ -41,7 +41,7 @@ array(
1: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_STATIC (8)
flags: STATIC (8)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -55,7 +55,7 @@ array(
2: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_ABSTRACT (16)
flags: ABSTRACT (16)
byRef: false
name: Identifier(
name: c
@ -68,7 +68,7 @@ array(
3: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_FINAL (32)
flags: FINAL (32)
byRef: false
name: Identifier(
name: d
@ -82,7 +82,7 @@ array(
4: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_STATIC (8)
flags: STATIC (8)
byRef: false
name: Identifier(
name: e
@ -96,7 +96,7 @@ array(
5: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_STATIC | MODIFIER_FINAL (40)
flags: STATIC | FINAL (40)
byRef: false
name: Identifier(
name: f

View File

@ -29,7 +29,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
byRef: false
name: Identifier(
name: a

View File

@ -18,7 +18,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -51,7 +51,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC | MODIFIER_PROTECTED (3)
flags: PUBLIC | PROTECTED (3)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -84,7 +84,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_READONLY (64)
flags: READONLY (64)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -117,7 +117,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_ABSTRACT (16)
flags: ABSTRACT (16)
byRef: false
name: Identifier(
name: a
@ -149,7 +149,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_STATIC (8)
flags: STATIC (8)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -182,7 +182,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_FINAL (32)
flags: FINAL (32)
byRef: false
name: Identifier(
name: a
@ -215,7 +215,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_ABSTRACT | MODIFIER_FINAL (48)
flags: ABSTRACT | FINAL (48)
byRef: false
name: Identifier(
name: a
@ -236,7 +236,7 @@ array(
0: Stmt_Class(
attrGroups: array(
)
flags: MODIFIER_ABSTRACT | MODIFIER_FINAL (48)
flags: ABSTRACT | FINAL (48)
name: Identifier(
name: A
)
@ -266,7 +266,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_ABSTRACT (16)
flags: ABSTRACT (16)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -299,7 +299,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_FINAL (32)
flags: FINAL (32)
type: null
props: array(
0: Stmt_PropertyProperty(

View File

@ -51,7 +51,7 @@ array(
2: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_ABSTRACT | MODIFIER_STATIC (24)
flags: ABSTRACT | STATIC (24)
byRef: false
name: Identifier(
name: baz

View File

@ -24,7 +24,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: Identifier(
name: string
)
@ -40,7 +40,7 @@ array(
1: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PROTECTED | MODIFIER_STATIC (10)
flags: PROTECTED | STATIC (10)
type: Name(
parts: array(
0: D
@ -58,7 +58,7 @@ array(
2: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PRIVATE (4)
flags: PRIVATE (4)
type: NullableType(
type: Identifier(
name: float
@ -76,7 +76,7 @@ array(
3: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC | MODIFIER_STATIC | MODIFIER_READONLY (73)
flags: PUBLIC | STATIC | READONLY (73)
type: NullableType(
type: Identifier(
name: int

View File

@ -26,7 +26,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
byRef: false
name: Identifier(
name: __construct
@ -35,7 +35,7 @@ array(
0: Param(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: Identifier(
name: float
)
@ -51,7 +51,7 @@ array(
1: Param(
attrGroups: array(
)
flags: MODIFIER_PROTECTED (2)
flags: PROTECTED (2)
type: Identifier(
name: array
)
@ -68,7 +68,7 @@ array(
2: Param(
attrGroups: array(
)
flags: MODIFIER_PRIVATE (4)
flags: PRIVATE (4)
type: Identifier(
name: string
)
@ -84,7 +84,7 @@ array(
3: Param(
attrGroups: array(
)
flags: MODIFIER_PUBLIC | MODIFIER_READONLY (65)
flags: PUBLIC | READONLY (65)
type: Identifier(
name: int
)

View File

@ -9,7 +9,7 @@ array(
0: Stmt_Class(
attrGroups: array(
)
flags: MODIFIER_READONLY (64)
flags: READONLY (64)
name: Identifier(
name: A
)
@ -30,7 +30,7 @@ array(
0: Stmt_Class(
attrGroups: array(
)
flags: MODIFIER_FINAL | MODIFIER_READONLY (96)
flags: FINAL | READONLY (96)
name: Identifier(
name: A
)

View File

@ -18,7 +18,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_READONLY (64)
flags: READONLY (64)
byRef: false
name: Identifier(
name: foo

View File

@ -68,7 +68,7 @@ array(
1: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -92,7 +92,7 @@ array(
2: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PROTECTED (2)
flags: PROTECTED (2)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -106,7 +106,7 @@ array(
3: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PRIVATE (4)
flags: PRIVATE (4)
type: null
props: array(
0: Stmt_PropertyProperty(
@ -120,7 +120,7 @@ array(
4: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
byRef: false
name: Identifier(
name: a
@ -134,7 +134,7 @@ array(
5: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PUBLIC | MODIFIER_STATIC (9)
flags: PUBLIC | STATIC (9)
byRef: false
name: Identifier(
name: b
@ -160,7 +160,7 @@ array(
6: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PUBLIC | MODIFIER_FINAL (33)
flags: PUBLIC | FINAL (33)
byRef: false
name: Identifier(
name: c
@ -178,7 +178,7 @@ array(
7: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PROTECTED (2)
flags: PROTECTED (2)
byRef: false
name: Identifier(
name: d
@ -192,7 +192,7 @@ array(
8: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PRIVATE (4)
flags: PRIVATE (4)
byRef: false
name: Identifier(
name: e

View File

@ -18,7 +18,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_STATIC (8)
flags: STATIC (8)
byRef: false
name: Identifier(
name: __construct
@ -51,7 +51,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_STATIC (8)
flags: STATIC (8)
byRef: false
name: Identifier(
name: __destruct
@ -84,7 +84,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_STATIC (8)
flags: STATIC (8)
byRef: false
name: Identifier(
name: __clone
@ -117,7 +117,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_STATIC (8)
flags: STATIC (8)
byRef: false
name: Identifier(
name: __CONSTRUCT
@ -150,7 +150,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_STATIC (8)
flags: STATIC (8)
byRef: false
name: Identifier(
name: __Destruct
@ -183,7 +183,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_STATIC (8)
flags: STATIC (8)
byRef: false
name: Identifier(
name: __cLoNe

View File

@ -20,7 +20,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PUBLIC | MODIFIER_STATIC (9)
flags: PUBLIC | STATIC (9)
byRef: false
name: Identifier(
name: create

View File

@ -32,7 +32,7 @@ array(
0: Stmt_ClassMethod(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
byRef: false
name: Identifier(
name: a
@ -81,7 +81,7 @@ array(
method: Identifier(
name: a
)
newModifier: MODIFIER_PROTECTED (2)
newModifier: PROTECTED (2)
newName: Identifier(
name: b
)
@ -101,7 +101,7 @@ array(
method: Identifier(
name: e
)
newModifier: MODIFIER_PRIVATE (4)
newModifier: PRIVATE (4)
newName: null
)
)
@ -156,7 +156,7 @@ array(
method: Identifier(
name: b
)
newModifier: MODIFIER_PROTECTED (2)
newModifier: PROTECTED (2)
newName: Identifier(
name: c
)
@ -184,7 +184,7 @@ array(
method: Identifier(
name: f
)
newModifier: MODIFIER_PRIVATE (4)
newModifier: PRIVATE (4)
newName: null
)
)

View File

@ -23,7 +23,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: UnionType(
types: array(
0: IntersectionType(

View File

@ -23,7 +23,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: IntersectionType(
types: array(
0: Name(

View File

@ -23,7 +23,7 @@ array(
0: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: UnionType(
types: array(
0: Name(

View File

@ -146,7 +146,7 @@ array(
1: Stmt_Property(
attrGroups: array(
)
flags: MODIFIER_PUBLIC (1)
flags: PUBLIC (1)
type: null
props: array(
0: Stmt_PropertyProperty(