多级控制器方法名支持驼峰命名的处理办法,希望下个版本加入
Open
- Dominant language
- PHP
- Stars
- 2.7k
- Forks
- 251
- PR merge metrics
- No merged PRs in 30d
Description
改 app里kebab2camel方法中正则表达式 /-([a-z]+)/ 为 /[_-]([a-z]+)/
public static function kebab2camel($name, bool $big = true)
{
$name = preg_replace_callback('/-([a-z]+)/', function($m) {
return ucfirst($m[1]);
}, $name);
return $big ? ucfirst($name) : $name;
}
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the app method named kebab2camel and review how controller method names are converted. Update the conversion so underscores are handled alongside hyphens, then verify that multi-level controller names using either separator produce the expected camel-case method name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100