File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ public function register()
28
28
T_CLASS ,
29
29
T_INTERFACE ,
30
30
T_TRAIT ,
31
+ T_ENUM ,
31
32
];
32
33
33
34
}//end register()
Original file line number Diff line number Diff line change @@ -137,6 +137,50 @@ trait Base
137
137
}
138
138
}
139
139
140
+ // Valid enum name.
141
+ enum ValidCamelCaseClass {}
142
+
143
+
144
+ // Incorrect usage of camel case.
145
+ enum invalidCamelCaseClass {}
146
+ enum Invalid_Camel_Case_Class_With_Underscores {}
147
+
148
+
149
+ // All lowercase.
150
+ enum invalidlowercaseclass {}
151
+ enum invalid_lowercase_class_with_underscores {}
152
+
153
+
154
+ // All uppercase.
155
+ enum VALIDUPPERCASECLASS {}
156
+ enum INVALID_UPPERCASE_CLASS_WITH_UNDERSCORES {}
157
+
158
+
159
+ // Mix camel case with uppercase.
160
+ enum ValidCamelCaseClassWithUPPERCASE {}
161
+
162
+
163
+ // Usage of numeric characters.
164
+ enum ValidCamelCaseClassWith1Number {}
165
+ enum ValidCamelCaseClassWith12345Numbers {}
166
+ enum ValidCamelCaseClassEndingWithNumber5 {}
167
+
168
+ enum Testing{}
169
+
170
+ enum Base
171
+ {
172
+ public function __construct ()
173
+ {
174
+ $ this ->anonymous = new class extends ArrayObject
175
+ {
176
+ public function __construct ()
177
+ {
178
+ parent ::__construct (['a ' => 1 , 'b ' => 2 ]);
179
+ }
180
+ };
181
+ }
182
+ }
183
+
140
184
if ( class_exists ( Test :: class ) ) {}
141
185
if ( class_exists ( Test2 ::class ) ) {}
142
186
Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ public function getErrorList()
47
47
108 => 1 ,
48
48
118 => 1 ,
49
49
120 => 1 ,
50
+ 145 => 1 ,
51
+ 146 => 1 ,
52
+ 150 => 1 ,
53
+ 151 => 1 ,
54
+ 156 => 1 ,
50
55
];
51
56
52
57
}//end getErrorList()
You can’t perform that action at this time.
0 commit comments