1Traits
2-----
3<?php
4
5trait A {
6    public function a() {}
7}
8
9class B {
10    use C;
11    use D {
12        a as protected b;
13        c as d;
14        e as private;
15    }
16    use E, F, G {
17        E::a insteadof F, G;
18        E::b as protected c;
19        E::d as e;
20        E::f as private;
21    }
22}
23-----
24array(
25    0: Stmt_Trait(
26        attrGroups: array(
27        )
28        name: Identifier(
29            name: A
30        )
31        stmts: array(
32            0: Stmt_ClassMethod(
33                attrGroups: array(
34                )
35                flags: PUBLIC (1)
36                byRef: false
37                name: Identifier(
38                    name: a
39                )
40                params: array(
41                )
42                returnType: null
43                stmts: array(
44                )
45            )
46        )
47    )
48    1: Stmt_Class(
49        attrGroups: array(
50        )
51        flags: 0
52        name: Identifier(
53            name: B
54        )
55        extends: null
56        implements: array(
57        )
58        stmts: array(
59            0: Stmt_TraitUse(
60                traits: array(
61                    0: Name(
62                        name: C
63                    )
64                )
65                adaptations: array(
66                )
67            )
68            1: Stmt_TraitUse(
69                traits: array(
70                    0: Name(
71                        name: D
72                    )
73                )
74                adaptations: array(
75                    0: Stmt_TraitUseAdaptation_Alias(
76                        trait: null
77                        method: Identifier(
78                            name: a
79                        )
80                        newModifier: PROTECTED (2)
81                        newName: Identifier(
82                            name: b
83                        )
84                    )
85                    1: Stmt_TraitUseAdaptation_Alias(
86                        trait: null
87                        method: Identifier(
88                            name: c
89                        )
90                        newModifier: null
91                        newName: Identifier(
92                            name: d
93                        )
94                    )
95                    2: Stmt_TraitUseAdaptation_Alias(
96                        trait: null
97                        method: Identifier(
98                            name: e
99                        )
100                        newModifier: PRIVATE (4)
101                        newName: null
102                    )
103                )
104            )
105            2: Stmt_TraitUse(
106                traits: array(
107                    0: Name(
108                        name: E
109                    )
110                    1: Name(
111                        name: F
112                    )
113                    2: Name(
114                        name: G
115                    )
116                )
117                adaptations: array(
118                    0: Stmt_TraitUseAdaptation_Precedence(
119                        trait: Name(
120                            name: E
121                        )
122                        method: Identifier(
123                            name: a
124                        )
125                        insteadof: array(
126                            0: Name(
127                                name: F
128                            )
129                            1: Name(
130                                name: G
131                            )
132                        )
133                    )
134                    1: Stmt_TraitUseAdaptation_Alias(
135                        trait: Name(
136                            name: E
137                        )
138                        method: Identifier(
139                            name: b
140                        )
141                        newModifier: PROTECTED (2)
142                        newName: Identifier(
143                            name: c
144                        )
145                    )
146                    2: Stmt_TraitUseAdaptation_Alias(
147                        trait: Name(
148                            name: E
149                        )
150                        method: Identifier(
151                            name: d
152                        )
153                        newModifier: null
154                        newName: Identifier(
155                            name: e
156                        )
157                    )
158                    3: Stmt_TraitUseAdaptation_Alias(
159                        trait: Name(
160                            name: E
161                        )
162                        method: Identifier(
163                            name: f
164                        )
165                        newModifier: PRIVATE (4)
166                        newName: null
167                    )
168                )
169            )
170        )
171    )
172)
173