Skip to content

Commit

Permalink
fix: StringHandler.php camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Aug 2, 2024
1 parent b661321 commit facee39
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/Models/src/Utils/StringHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static function variablize(?string $string): string
}

/**
* Transform to camelcase.
* Transform to lower camelCase.
*
* @param string|null $string
*
Expand All @@ -122,14 +122,13 @@ public static function camelCase(?string $string): string
return '';
}

return (new UnicodeString($string))
return mb_lcfirst((new UnicodeString($string))
->ascii()
->camel()
->trim('-')
->trim('_')
->trim()
->toString()
;
->camel()
->toString());
}


Expand Down

0 comments on commit facee39

Please sign in to comment.