MemberDataSharingSegment::jsonSerialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Audiens\AppnexusClient\entity;
4
5
class MemberDataSharingSegment implements \JsonSerializable
6
{
7
    use HydratableTrait;
8
9
    /** @var int */
10
    protected $id;
11
12
    /** @var string|null */
13
    protected $name;
14
15
    public function getId(): int
16
    {
17
        return $this->id;
18
    }
19
20
    public function setId(int $id)
21
    {
22
        $this->id = $id;
23
    }
24
25
    public function getName(): ?string
26
    {
27
        return $this->name;
28
    }
29
30
    public function setName(string $name)
31
    {
32
        $this->name = $name;
33
    }
34
35
    public function jsonSerialize()
36
    {
37
        return [
38
            'id' => $this->getId(),
39
            'name' => $this->getName(),
40
        ];
41
    }
42
}
43