Consumer   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 88
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 88
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getCreatedAt() 0 3 1
A setCustomId() 0 5 1
A getCustomId() 0 3 1
A getId() 0 3 1
A getUsername() 0 3 1
A setUsername() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace CCT\Kong\Model;
6
7
class Consumer
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $id;
13
14
    /**
15
     * @var string
16
     */
17
    protected $username;
18
19
    /**
20
     * @var string
21
     */
22
    protected $customId;
23
24
    /**
25
     * @var \DateTime
26
     */
27
    protected $createdAt;
28
29
    /**
30
     * Gets the consumer's identification;
31
     *
32
     * @return null|string
33
     */
34 7
    public function getId(): ?string
35
    {
36 7
        return $this->id;
37
    }
38
39
    /**
40
     * Sets the unique username of the consumer.
41
     *
42
     * @param string $username
43
     *
44
     * @return static
45
     */
46 3
    public function setUsername(string $username): self
47
    {
48 3
        $this->username = $username;
49
50 3
        return $this;
51
    }
52
53
    /**
54
     * Gets the unique username of the consumer.
55
     *
56
     * @return string
57
     */
58 1
    public function getUsername(): ?string
59
    {
60 1
        return $this->username;
61
    }
62
63
    /**
64
     * Sets the field for storing an existing unique ID for the consumer.
65
     *
66
     * @param string $customId
67
     *
68
     * @return static
69
     */
70 2
    public function setCustomId(string $customId): self
71
    {
72 2
        $this->customId = $customId;
73
74 2
        return $this;
75
    }
76
77
    /**
78
     * Gets the field for storing an existing unique ID for the consumer.
79
     *
80
     * @return null|string
81
     */
82 1
    public function getCustomId(): ?string
83
    {
84 1
        return $this->customId;
85
    }
86
87
    /**
88
     * Gets the date that the consumer was created.
89
     *
90
     * @return \DateTime
91
     */
92 2
    public function getCreatedAt(): ?\DateTime
93
    {
94 2
        return $this->createdAt;
95
    }
96
}