-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Description
- 自述
- 首先,一定要自我批评,避免大家攻击我,认为我自以为是:
大家好,我是一个渣渣,对一部分人来说,我可能是最讨厌的一类人,自述完毕!
- 首先,一定要自我批评,避免大家攻击我,认为我自以为是:
- 问题描述
emmmmm。。。我不是针对谁,但是一看就是原来程序员离职了,新人(我们称之为“小白”)接手了,完了,这个小白察觉出旧版的弊端:没有命名空间,然后一顿操作猛如虎,新版SDK上线了。。。喜闻乐见,以下代码在SDK中很常见,不是个例,不要认为我鸡蛋里面挑骨头:
代码链接
/**
* 添加封禁
*
* @param array $Chatroom
* $Chatroom = [
];
* @return mixed|null
*/
public function getList(array $Chatroom=[]){
$conf = $this->conf['getList'];
$result = (new Request())->Request($conf['url'],$Chatroom);
$result = (new Utils())->responseError($result, $conf['response']['fail']);
if($result['code'] == 200){
$result = (new Utils())->rename($result,['users'=>'members']);
foreach ($result['members'] as $k=>&$v){
$v = (new Utils())->rename($v,['userId'=>'id']);
}
}
return $result;
}
qq475281441
Metadata
Metadata
Assignees
Labels
No labels