File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,22 +6,22 @@ class NamingStyle
66{
77 public static function isUpperCamelCase (string $ str ): bool
88 {
9- return preg_match ('/^[A-Z][a-zA-Z]*$/ ' , $ str ) === 1 ;
9+ return preg_match ('/^[A-Z][a-zA-Z\d ]*$/ ' , $ str ) === 1 ;
1010 }
1111
1212 public static function isLowerCamelCase (string $ str ): bool
1313 {
14- return preg_match ('/^[a-z]*[A-Z][a-zA-Z]*$/ ' , $ str ) === 1 ;
14+ return preg_match ('/^[a-z]*[A-Z][a-zA-Z\d ]*$/ ' , $ str ) === 1 ;
1515 }
1616
1717 public static function isSnakeCase (string $ str ): bool
1818 {
19- return preg_match ('/^[a-z]+(_[a-z]+)*$/ ' , $ str ) === 1 ;
19+ return preg_match ('/^[a-z\d ]+(_[a-z\d ]+)*$/ ' , $ str ) === 1 ;
2020 }
2121
2222 public static function isScreamingSnakeCase (string $ str ): bool
2323 {
24- return preg_match ('/^[A-Z]+(_[A-Z]+)*$/ ' , $ str ) === 1 ;
24+ return preg_match ('/^[A-Z\d ]+(_[A-Z\d ]+)*$/ ' , $ str ) === 1 ;
2525 }
2626
2727 public static function toSnakeCase (string $ str ): string
You can’t perform that action at this time.
0 commit comments