助手函数helpers.php 中locale方法在设置 $locale时应该是无返回的
Open
- Dominant language
- PHP
- Stars
- 2.7k
- Forks
- 251
- PR merge metrics
- No merged PRs in 30d
Description
/**
* Locale
* @param string|null $locale
* @return void
*/
function locale(string $locale = null)
{
if (!$locale) {
return Translation::getLocale();
}
Translation::setLocale($locale);
}
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue points to helpers.php and the locale() helper; inspect its current getter and setter behavior first, along with any related tests or call sites. Confirm the setter path has no return value while the getter still returns the current locale, and verify the expected behavior with the relevant test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, localization
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100