| Total Complexity | 6 |
| Total Lines | 88 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 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 |
|
| 95 | } |
||
| 96 | } |