This commit is contained in:
2020-09-01 04:33:57 +08:00
parent 6cdb827416
commit ab9b5ed9cc
+2 -2
View File
@@ -54,8 +54,8 @@ class Websocket extends Annotation
*/
public function getName($events, $comment = [])
{
$prefix = rtrim('WEBSOCKET:ANNOTATION:' . $events, ':');
if (isset($comment[2])) {
$prefix = 'WEBSOCKET:ANNOTATION:' . ltrim($events, ':');
if (isset($comment[2]) && !empty($comment[2])) {
return $prefix . ':' . $comment[2];
}
return $prefix;