Completed
Push — master ( 3fc9ab...55f7c6 )
by Elodie
10s
created

CallTracking::hasCallerId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Yproximite\Api\Model\CallTracking;
5
6
use Yproximite\Api\Model\ModelInterface;
7
8
/**
9
 * Class CallTracking
10
 */
11
class CallTracking implements ModelInterface
12
{
13
    /**
14
     * @var int
15
     */
16
    private $id;
17
18
    /**
19
     * @var string
20
     */
21
    private $name;
22
23
    /**
24
     * @var string
25
     */
26
    private $phoneDid;
27
28
    /**
29
     * @var string
30
     */
31
    private $phoneDestination;
32
33
    /**
34
     * @var bool
35
     */
36
    private $callerId;
37
38
    /**
39
     * CallTracking constructor.
40
     *
41
     * @param array $data
42
     */
43
    public function __construct(array $data)
44
    {
45
        $this->id               = (int) $data['id'];
46
        $this->name             = (string) $data['name'];
47
        $this->phoneDid         = (string) $data['phoneDid'];
48
        $this->phoneDestination = (string) $data['phoneDestination'];
49
        $this->callerId         = (bool) $data['callerId'];
50
    }
51
52
    /**
53
     * @return int
54
     */
55
    public function getId(): int
56
    {
57
        return $this->id;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getName(): string
64
    {
65
        return $this->name;
66
    }
67
68
    /**
69
     * @return string
70
     */
71
    public function getPhoneDid(): string
72
    {
73
        return $this->phoneDid;
74
    }
75
76
    /**
77
     * @return string
78
     */
79
    public function getPhoneDestination(): string
80
    {
81
        return $this->phoneDestination;
82
    }
83
84
    /**
85
     * @return boolean
86
     */
87
    public function hasCallerId(): bool
88
    {
89
        return $this->callerId;
90
    }
91
}
92