Test Failed
Push — master ( 299cbe...c555d0 )
by Maxim
01:58
created

PastPosition   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
dl 0
loc 65
c 0
b 0
f 0
rs 10
1
<?php
2
3
/**
4
 * Class PastPosition.
5
 *
6
 * Stores information about employee's position.
7
 */
8
class PastPosition
9
{
10
    /** @var string position name */
11
    private $name;
12
    /** @var Departament departament */
13
    private $departament;
14
15
    /**
16
     * PastPosition constructor.
17
     *
18
     * @param string $name position name
19
     * @param Departament $departament departament
20
     */
21
    public function __construct(string $name, Departament $departament)
22
    {
23
        $this->name = $name;
24
        $this->departament = $departament;
25
    }
26
27
    /**
28
     * Getter for name.
29
     *
30
     * @see PastPosition::$name
31
     *
32
     * @return string position name
33
     */
34
    public function getName(): string
35
    {
36
        return $this->name;
37
    }
38
39
    /**
40
     * Getter for departament.
41
     *
42
     * @see PastPosition::$departament
43
     *
44
     * @return Departament departament
45
     */
46
    public function getDepartament(): Departament
47
    {
48
        return $this->departament;
49
    }
50
51
    /**
52
     * Setter for name.
53
     *
54
     * @see PastPosition::$name
55
     *
56
     * @param string $name new name
57
     */
58
    public function setName(string $name): void
59
    {
60
        $this->name = $name;
61
    }
62
63
    /**
64
     * Setter for departament.
65
     *
66
     * @see PastPosition::$departament
67
     *
68
     * @param Departament $departament new departament
69
     */
70
    public function setDepartament(Departament $departament): void
71
    {
72
        $this->departament = $departament;
73
    }
74
}