PulseTag   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 96
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 85%

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 1
dl 0
loc 96
c 0
b 0
f 0
ccs 17
cts 20
cp 0.85
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getUrl() 0 6 1
A getId() 0 6 1
A getName() 0 6 1
A getColor() 0 6 1
A getCreatedAt() 0 7 1
A getUpdatedAt() 0 7 1
1
<?php
2
3
/**
4
 * @copyright 2019 Vladimir Jimenez
5
 * @license   https://github.com/allejo/PhpPulse/blob/master/LICENSE.md MIT
6
 */
7
8
namespace allejo\DaPulse;
9
10
use allejo\DaPulse\Objects\ApiObject;
11
12
class PulseTag extends ApiObject
13
{
14
    const API_PREFIX = "tags";
15
16
    /**
17
     * @var string
18
     */
19
    protected $url;
20
21
    /**
22
     * @var int
23
     */
24
    protected $id;
25
26
    /**
27
     * @var string
28
     */
29
    protected $name;
30
31
    /**
32
     * @var string
33
     */
34
    protected $color;
35
36
    /**
37
     * @var \DateTime
38
     */
39
    protected $created_at;
40
41
    /**
42
     * @var \DateTime
43
     */
44
    protected $updated_at;
45
46
    /**
47
     * @return string
48
     */
49
    public function getUrl ()
50
    {
51
        $this->lazyLoad();
52
53
        return $this->url;
54
    }
55
56
    /**
57
     * @return int
58
     */
59 2
    public function getId ()
60
    {
61 2
        $this->lazyLoad();
62
63 2
        return $this->id;
64
    }
65
66
    /**
67
     * @return string
68
     */
69 2
    public function getName ()
70
    {
71 2
        $this->lazyLoad();
72
73 2
        return $this->name;
74
    }
75
76
    /**
77
     * @return string
78
     */
79 2
    public function getColor ()
80
    {
81 2
        $this->lazyLoad();
82
83 2
        return $this->color;
84
    }
85
86
    /**
87
     * @return \DateTime
88
     */
89 1
    public function getCreatedAt ()
90
    {
91 1
        $this->lazyLoad();
92 1
        self::lazyCast($this->created_at, '\DateTime');
93
94 1
        return $this->created_at;
95
    }
96
97
    /**
98
     * @return \DateTime
99
     */
100 1
    public function getUpdatedAt ()
101
    {
102 1
        $this->lazyLoad();
103 1
        self::lazyCast($this->updated_at, '\DateTime');
104
105 1
        return $this->updated_at;
106
    }
107
}
108