Commit a799eeb9 by Tobias Munk

code style

parent 7c04ff04
......@@ -331,7 +331,7 @@ class BaseInflector
*/
public static function camel2id($name, $separator = '-', $strict = false)
{
$regex = ($strict)?'/[A-Z]/':'/(?<![A-Z])[A-Z]/';
$regex = $strict ? '/[A-Z]/' : '/(?<![A-Z])[A-Z]/';
if ($separator === '_') {
return trim(strtolower(preg_replace($regex, '_\0', $name)), '_');
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment