Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
66.67% |
6 / 9 |
|
50.00% |
3 / 6 |
CRAP | |
0.00% |
0 / 1 |
TreatmentDataCategory | |
66.67% |
6 / 9 |
|
50.00% |
3 / 6 |
7.33 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |||
__toString | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getCode | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getPosition | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
isSensible | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | /** |
4 | * This file is part of the MADIS - RGPD Management application. |
5 | * |
6 | * @copyright Copyright (c) 2018-2019 Soluris - Solutions Numériques Territoriales Innovantes |
7 | * |
8 | * This program is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU Affero General Public License as published by |
10 | * the Free Software Foundation, either version 3 of the License, or |
11 | * (at your option) any later version. |
12 | * |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU Affero General Public License for more details. |
17 | * |
18 | * You should have received a copy of the GNU Affero General Public License |
19 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
20 | */ |
21 | |
22 | declare(strict_types=1); |
23 | |
24 | namespace App\Domain\Registry\Model; |
25 | |
26 | class TreatmentDataCategory |
27 | { |
28 | /** |
29 | * @var string |
30 | */ |
31 | private $code; |
32 | |
33 | /** |
34 | * @var string |
35 | */ |
36 | private $name; |
37 | |
38 | /** |
39 | * @var int |
40 | */ |
41 | private $position; |
42 | |
43 | /** |
44 | * @var bool |
45 | */ |
46 | private $sensible; |
47 | |
48 | /** |
49 | * TreatmentDataCategory constructor. |
50 | */ |
51 | public function __construct(string $code, string $name, int $position, bool $sensible = false) |
52 | { |
53 | $this->code = $code; |
54 | $this->name = $name; |
55 | $this->position = $position; |
56 | $this->sensible = $sensible; |
57 | } |
58 | |
59 | public function __toString(): string |
60 | { |
61 | return $this->name; |
62 | } |
63 | |
64 | public function getCode(): string |
65 | { |
66 | return $this->code; |
67 | } |
68 | |
69 | public function getName(): string |
70 | { |
71 | return $this->name; |
72 | } |
73 | |
74 | public function getPosition(): int |
75 | { |
76 | return $this->position; |
77 | } |
78 | |
79 | public function isSensible(): bool |
80 | { |
81 | return $this->sensible; |
82 | } |
83 | } |