SdisProfile   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 79
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 5
c 2
b 0
f 0
lcom 1
cbo 1
dl 0
loc 79
ccs 15
cts 15
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getGrade() 0 4 1
A promote() 0 6 1
A getPoste() 0 4 1
A setPoste() 0 6 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