优化代码

main
gzydong 2021-08-01 00:45:35 +08:00
parent c67f9877d4
commit 8d8c4d90e9
3 changed files with 3 additions and 4 deletions

View File

@ -44,9 +44,8 @@ class ContactsApplyController extends CController
$params['friend_id'] = (int)$params['friend_id'];
$user = $userService->findById($params['friend_id']);
if (!$user) {
return $this->response->fail('用户不存在!');
}
if (!$user) return $this->response->fail('用户不存在!');
$user_id = $this->uid();
$key = "{$user_id}_{$params['friend_id']}";

View File

@ -24,7 +24,6 @@ use Swoole\Websocket\Frame;
use Swoole\Http\Response;
use Swoole\WebSocket\Server;
use App\Service\SocketClientService;
use App\Model\Group\GroupMember;
use App\Event\TalkEvent;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Traits;