We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
简单看了下,服务端代码质量感觉不大行,提几个建议哈:
$request->session
$_SESSION
required
Config::get()
env
pushkey
push_key
foreach ($devices as $device) { if ($device) { $func_name = $device['type'].'_send'; if (function_exists($func_name)) { $result[] = $func_name($device->is_clip, $device->device_id, $validated['text'], '', env('APP_DEBUG')); } } }
可以改写为:
foreach ($devices as $device) { if (!$device) { confinue; } $func_name = $device['type'].'_send'; if (function_exists($func_name)) { $result[] = $func_name($device->is_clip, $device->device_id, $validated['text'], '', env('APP_DEBUG')); } }
The text was updated successfully, but these errors were encountered:
首先欢迎贡献修正代码。然后api实现的确在编码规范性上有问题,除以下几个外表示赞同。
Sorry, something went wrong.
No branches or pull requests
简单看了下,服务端代码质量感觉不大行,提几个建议哈:
$request->session
代替$_SESSION
来操作 sessionrequired
再判断类型Config::get()
来读取配置,而非使用env
读取环境变量pushkey
改为push_key
可以改写为:
The text was updated successfully, but these errors were encountered: