@@ -39,8 +39,8 @@ public static function stringSnake(string $value, string $delimiter = '_')
39
39
{
40
40
$ key = $ value ;
41
41
42
- if (isset (static ::$ snakeCache [$ key ][$ delimiter ])) {
43
- return static ::$ snakeCache [$ key ][$ delimiter ];
42
+ if (isset (self ::$ snakeCache [$ key ][$ delimiter ])) {
43
+ return self ::$ snakeCache [$ key ][$ delimiter ];
44
44
}
45
45
46
46
if (!ctype_lower ($ value )) {
@@ -49,7 +49,7 @@ public static function stringSnake(string $value, string $delimiter = '_')
49
49
$ value = static ::stringLower (preg_replace ('/(.)(?=[A-Z])/u ' , '$1 ' .$ delimiter , $ value ));
50
50
}
51
51
52
- return static ::$ snakeCache [$ key ][$ delimiter ] = $ value ;
52
+ return self ::$ snakeCache [$ key ][$ delimiter ] = $ value ;
53
53
}
54
54
55
55
/**
@@ -63,13 +63,13 @@ public static function stringStudly(string $value)
63
63
{
64
64
$ key = $ value ;
65
65
66
- if (isset (static ::$ studlyCache [$ key ])) {
67
- return static ::$ studlyCache [$ key ];
66
+ if (isset (self ::$ studlyCache [$ key ])) {
67
+ return self ::$ studlyCache [$ key ];
68
68
}
69
69
70
70
$ value = ucwords (str_replace (['- ' , '_ ' ], ' ' , $ value ));
71
71
72
- return static ::$ studlyCache [$ key ] = str_replace (' ' , '' , $ value );
72
+ return self ::$ studlyCache [$ key ] = str_replace (' ' , '' , $ value );
73
73
}
74
74
75
75
/**
@@ -81,11 +81,11 @@ public static function stringStudly(string $value)
81
81
*/
82
82
public static function stringCamel (string $ value )
83
83
{
84
- if (isset (static ::$ camelCache [$ value ])) {
85
- return static ::$ camelCache [$ value ];
84
+ if (isset (self ::$ camelCache [$ value ])) {
85
+ return self ::$ camelCache [$ value ];
86
86
}
87
87
88
- return static ::$ camelCache [$ value ] = lcfirst (static ::stringStudly ($ value ));
88
+ return self ::$ camelCache [$ value ] = lcfirst (static ::stringStudly ($ value ));
89
89
}
90
90
91
91
/**
0 commit comments