1 | <?php |
||
8 | class SapeurPompierSdisProfile extends SdisProfile |
||
9 | { |
||
10 | /** |
||
11 | * Type du profil |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $type = 'sapeur_pompier'; |
||
16 | |||
17 | /** |
||
18 | * Pro ou volontaire ? |
||
19 | * |
||
20 | * @var bool |
||
21 | */ |
||
22 | protected $is_pro; |
||
23 | |||
24 | /* |
||
25 | * Constructeur |
||
26 | * |
||
27 | * @param SDIS62\Core\User\Entity\User $user |
||
28 | * @param Sstring $grade |
||
29 | * @param string $poste |
||
30 | * @param bool $pro Optionnel |
||
31 | */ |
||
32 | 45 | public function __construct(User $user, $grade, $poste, $pro = false) |
|
38 | |||
39 | /** |
||
40 | * Get the value of Pro ou volontaire ? |
||
41 | * |
||
42 | * @return bool |
||
43 | */ |
||
44 | 6 | public function isPro() |
|
48 | |||
49 | /** |
||
50 | * Set the value of Pro ou volontaire ? |
||
51 | * |
||
52 | * @param bool is_pro |
||
53 | * |
||
54 | * @return self |
||
55 | */ |
||
56 | 6 | public function setPro($value = true) |
|
62 | } |
||
63 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.