Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | function snake_case(string $str) |
||
1 ignored issue
–
show
|
|||
34 | { |
||
35 | if (ctype_lower($str)) { |
||
36 | return $str; |
||
37 | } |
||
38 | |||
39 | return mb_strtolower(preg_replace('/(.)(?=[A-Z])/u', '$1_', preg_replace('/\s+/u', '', $str)), 'utf-8'); |
||
40 | } |
||
41 | |||
53 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.