Comment   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 3
c 1
b 0
f 0
dl 0
loc 11
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRequestPath() 0 3 1
A getRequestMethod() 0 3 1
1
<?php
2
/**
3
 * This file is part of the mucts.com.
4
 *
5
 * This source file is subject to the MIT license that is bundled
6
 * with this source code in the file LICENSE.
7
 *
8
 * @version 1.0
9
 * @author herry<[email protected]>
10
 * @copyright © 2020  MuCTS.com All Rights Reserved.
11
 */
12
13
namespace MuCTS\Sobot\OnlineService;
14
15
16
use MuCTS\Sobot\Contracts\Sobot;
17
18
/**
19
 * Class Comment
20
 * 客户评价
21
 *
22
 * 接口说明:
23
 * 接口类型:主动调用接口
24
 * 接口作用:可通过调用该接口执行用户对会话进行满意度评价。
25
 *
26
 * @property-write string $partnerid  企业自己的用户id,可自行传值
27
 * @property-write int|null $type  评价类型:0:评价机器人,1:评价人工
28
 * @property-write int|null $solved  评价结果:0:未解决,1:已解决
29
 * @property-write int|null $score  人工评价分数(1,2,3,4,5)
30
 * @property-write string $tag  评价标签,多个用逗号分隔
31
 * @property-write string $remark  评价内容
32
 * @property-write int|null $comment_type  评价类型:0-邀请评价,1-主动评价
33
 *
34
 * @method Comment partnerid(string $partnerid)  企业自己的用户id,可自行传值
35
 * @method Comment type(int $type)  评价类型:0:评价机器人,1:评价人工
36
 * @method Comment solved(int $solved) 评价结果:0:未解决,1:已解决
37
 * @method Comment score(?int $score) 人工评价分数(1, 2, 3, 4, 5)
38
 * @method Comment tag(?string $tag) 评价标签,多个用逗号分隔
39
 * @method Comment remark(?string $remark)  评价内容
40
 * @method Comment commentType(?string $commentType)  评价类型:0-邀请评价,1-主动评价
41
 *
42
 * @package MuCTS\Sobot\OnlineService
43
 */
44
class Comment extends Sobot
45
{
46
47
    public function getRequestMethod(): string
48
    {
49
        return self::METHOD_POST;
50
    }
51
52
    public function getRequestPath(): string
53
    {
54
        return '/api/chat/5/user/comment';
55
    }
56
}