Item   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 13
c 1
b 0
f 0
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getGroupTypeCn() 0 14 5
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\Agents\SaveGroups\Response;
14
15
16
use MuCTS\Sobot\Contracts\Response;
17
18
/**
19
 * Class Item
20
 * @property-read string $groupid 技能组ID
21
 * @property-read string $group_name 技能组名称
22
 * @property-read int $group_type 技能组类型,0工单客服组,1在线客服组,2电话客服组,3 电销组
23
 * @property-read string $group_type_cn 技能组类型
24
 * @package MuCTS\Sobot\Agents\SaveGroups\Response
25
 */
26
class Item extends Response
27
{
28
    /**
29
     * 技能组类型
30
     * @return string
31
     */
32
    public function getGroupTypeCn()
33
    {
34
        $groupType = intval($this->group_type);
35
        switch ($groupType) {
36
            case 0:
37
                return '工单坐席组';
38
            case 1:
39
                return '在线坐席组';
40
            case 2:
41
                return '电话坐席组';
42
            case 3:
43
                return '电销组';
44
            default:
45
                return '未知';
46
        }
47
    }
48
}