strings
strings copied to clipboard
Optimize Inflector
We have introduced https://github.com/yiisoft/strings/blob/master/src/CombinedRegexp.php that helps with a loop of regexps.
There are some places to apply CombinedRegexp
:
- https://github.com/yiisoft/strings/blob/63aef52b3d8568af153bddc1f526994474d96074/src/Inflector.php#L439
- https://github.com/yiisoft/strings/blob/63aef52b3d8568af153bddc1f526994474d96074/src/Inflector.php#L418
User can override rules via withSingularizeRules()
and withPluralizeRules()
methods, and use regular expressions with different flags. It is do not allow us use CombinedRegexp
here.
I didn't get you
I didn't get you
CombinedRegexp
uses same flags for all expressions, but inflector allow use expressions with different flags.