Skip to content

Commit 7451861

Browse files
committed
chore: cleanup diff
1 parent 1413a93 commit 7451861

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/SDK/Language.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,21 @@ protected function toCamelCase($str): string
9898
return lcfirst($str);
9999
}
100100

101-
function toSnakeCase($string) {
101+
protected function toSnakeCase($str): string {
102102
// Replace alternative character sets
103-
$string = iconv('UTF-8', 'ASCII//TRANSLIT', $string);
103+
$str = iconv('UTF-8', 'ASCII//TRANSLIT', $str);
104104

105105
// Replace seperating characters with underscores
106106
// Includes: spaces, dashes, apostrophes, periods and slashes
107-
$string = preg_replace('/[ \'.\/-]/', '_', $string);
107+
$str = preg_replace('/[ \'.\/-]/', '_', $str);
108108

109109
// Seperate camelCase with underscores
110-
$string = preg_replace_callback('/([a-z])([^a-z_])/', function($matches) {
110+
$str = preg_replace_callback('/([a-z])([^a-z_])/', function($matches) {
111111
return $matches[1] . '_' . strtolower($matches[2]);
112-
}, $string);
112+
}, $str);
113113

114114
// Remove ignorable characters
115-
return preg_replace('/[^a-z0-9_]/', '', strtolower($string));
115+
return preg_replace('/[^a-z0-9_]/', '', strtolower($str));
116116
}
117117

118118
protected function toUpperSnakeCase($str): string

0 commit comments

Comments
 (0)