Skip to content

Commit

Permalink
fix regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
mblajek committed Oct 7, 2024
1 parent 98d89ac commit 29bb019
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Utils/Transformer/StringTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class StringTransformer
private static array $camelCache = [];
private static array $snakeCache = [];

private const string CAMEL_REGEXP = '/^((?:__)?[a-z][a-z0-9]+)([a-z0-9A-Z]*)$/';
private const string SNAKE_REGEXP = '/^((?:__)?[a-z][a-z0-9]+)((?:_[a-z][a-z0-9]*)*)$/';
private const string CAMEL_REGEXP = '/^((?:__)?[a-z][a-z0-9]*)([a-z0-9A-Z]*)$/';
private const string SNAKE_REGEXP = '/^((?:__)?[a-z][a-z0-9]*)((?:_[a-z][a-z0-9]*)*)$/';

public static function snake(string $value): string
{
Expand Down

0 comments on commit 29bb019

Please sign in to comment.