Completed
Push — master ( df502b...4c9fbf )
by Rémi
17s
created

TeamWorker::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Yproximite\Api\Model\TeamWorker;
5
6
use Yproximite\Api\Model\ModelInterface;
7
8
/**
9
 * Class TeamWorker
10
 */
11
class TeamWorker implements ModelInterface
12
{
13
    /**
14
     * @var int
15
     */
16
    private $id;
17
18
    /**
19
     * @var string
20
     */
21
    private $lastName;
22
23
    /**
24
     * @var string
25
     */
26
    private $firstName;
27
28
    /**
29
     * TeamWorker constructor.
30
     *
31
     * @param array $data
32
     */
33
    public function __construct(array $data)
34
    {
35
        $this->id        = (int) $data['id'];
36
        $this->lastName  = (string) $data['lastName'];
37
        $this->firstName = (string) $data['firstName'];
38
    }
39
40
    /**
41
     * @return int
42
     */
43
    public function getId(): int
44
    {
45
        return $this->id;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getLastName(): string
52
    {
53
        return $this->lastName;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getFirstName(): string
60
    {
61
        return $this->firstName;
62
    }
63
}
64