up. 优化代码内容
This commit is contained in:
parent
b0020f6623
commit
28cf17bbf2
@ -23,9 +23,11 @@ class PutMessage
|
||||
public function __construct(string $ws_client_id, string $type, string $event, array $data = [])
|
||||
{
|
||||
$this->wsClientId = $ws_client_id;
|
||||
if ($type == MessageType::System) {
|
||||
if ($type == MessageType::System->value) {
|
||||
$this->type = MessageType::System;
|
||||
$this->event = SystemEnum::tryFrom($event);
|
||||
}else{
|
||||
$this->type = null;
|
||||
}
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user