You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first thing the function does is lowercase the input. After that, in line 580 there is a lot of preg_replacegoing on, checking uppercase chars and finally lowercasing the whole string again.
I was wondering why that is there. I think, the code could be simplified
you don't understand it right. Lowercasing the string is the last thing it does. The other thing it does is converting camelCase to underscore-separated words
If I understand the code correctly, there is unneccessary code in
Transliterator::postProcessText
(https://github.com/Behat/Transliterator/blob/master/src/Behat/Transliterator/Transliterator.php#L568)The first thing the function does is lowercase the input. After that, in line 580 there is a lot of
preg_replace
going on, checking uppercase chars and finally lowercasing the whole string again.I was wondering why that is there. I think, the code could be simplified
before
after
The text was updated successfully, but these errors were encountered: