Item   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
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 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getIsWorkCn() 0 4 2
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\AdminIsWork\Response;
14
15
16
use MuCTS\Sobot\Contracts\Response;
17
18
/**
19
 * Class Item
20
 * @property-read string $is_work 上下班状态:true-上班;false-下班
21
 * @property-read string $is_work_cn 上下班状态
22
 * @package MuCTS\Sobot\OnlineService\AdminIsWork\Response
23
 */
24
class Item extends Response
25
{
26
    /**
27
     * 上下班状态
28
     * @return string
29
     */
30
    public function getIsWorkCn()
31
    {
32
        $is_work = $this->is_work;
33
        return $is_work === 'true' ? '上班' : '下班';
34
    }
35
}