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()
2828 T_CLASS ,
2929 T_INTERFACE ,
3030 T_TRAIT ,
31+ T_ENUM ,
3132 ];
3233
3334 }//end register()
Original file line number Diff line number Diff line change @@ -137,6 +137,50 @@ trait Base
137137 }
138138}
139139
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+
140184if ( class_exists ( Test :: class ) ) {}
141185if ( class_exists ( Test2 ::class ) ) {}
142186
Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ public function getErrorList()
4747 108 => 1 ,
4848 118 => 1 ,
4949 120 => 1 ,
50+ 145 => 1 ,
51+ 146 => 1 ,
52+ 150 => 1 ,
53+ 151 => 1 ,
54+ 156 => 1 ,
5055 ];
5156
5257 }//end getErrorList()
You can’t perform that action at this time.
0 commit comments