测试
This commit is contained in:
@@ -15,19 +15,18 @@ enum MessageTypeEnum: int
|
||||
|
||||
|
||||
/**
|
||||
* @param int $value
|
||||
* @return string
|
||||
*/
|
||||
public function description(int $value): string
|
||||
public function description(): string
|
||||
{
|
||||
return match ($value) {
|
||||
self::Text->value => '文本',
|
||||
self::Image->value => '图片',
|
||||
self::Audio->value => '音频',
|
||||
self::Video->value => '视频',
|
||||
self::Prescription->value => '处方',
|
||||
self::Case->value => '病例',
|
||||
self::VideoCall->value => '视频通话',
|
||||
return match ($this) {
|
||||
self::Text => '文本',
|
||||
self::Image => '图片',
|
||||
self::Audio => '音频',
|
||||
self::Video => '视频',
|
||||
self::Prescription => '处方',
|
||||
self::Case => '病例',
|
||||
self::VideoCall => '视频通话',
|
||||
default => '未知',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user