SdisProfile::setPoste()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace SDIS62\Core\User\Entity\Profile;
4
5
use SDIS62\Core\User\Entity\User;
6
use SDIS62\Core\User\Entity\Profile;
7
8
abstract class SdisProfile extends Profile
9
{
10
    /**
11
     * Grade
12
     *
13
     * @var string
14
     */
15
    protected $grade;
16
17
    /**
18
     * Poste
19
     *
20
     * @var string
21
     */
22
    protected $poste;
23
24
    /*
25
    * Constructeur
26
    *
27
    * @param SDIS62\Core\User\Entity\User $user
28
    * @param string $grade
29
    * @param string $poste
30
    */
31 96
    public function __construct(User $user, $grade, $poste)
32
    {
33 96
        $this->grade = $grade;
34 96
        $this->poste = $poste;
35
36 96
        parent::__construct($user);
37 96
    }
38
39
    /**
40
     * Get the value of Grade
41
     *
42
     * @return string
43
     */
44 18
    public function getGrade()
45
    {
46 18
        return $this->grade;
47
    }
48
49
    /**
50
     * Change le grade associé au profil
51
     *
52
     * @param string grade
53
     *
54
     * @return self
55
     */
56 6
    public function promote($value)
57
    {
58 6
        $this->grade = $value;
59
60 6
        return $this;
61
    }
62
63
    /**
64
     * Get the value of Poste
65
     *
66
     * @return string
67
     */
68 12
    public function getPoste()
69
    {
70 12
        return $this->poste;
71
    }
72
73
    /**
74
     * Set the value of Poste
75
     *
76
     * @param string poste
77
     *
78
     * @return self
79
     */
80 3
    public function setPoste($value)
81
    {
82 3
        $this->poste = $value;
83
84 3
        return $this;
85
    }
86
}
87