Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
15 / 15
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
ViolationConcernedPeopleDictionary
100.00% covered (success)
100.00%
15 / 15
100.00% covered (success)
100.00%
3 / 3
3
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getConcernedPeople
100.00% covered (success)
100.00%
13 / 13
100.00% covered (success)
100.00%
1 / 1
1
 getConcernedPeopleKeys
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
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
22declare(strict_types=1);
23
24namespace App\Domain\Registry\Dictionary;
25
26use App\Application\Dictionary\SimpleDictionary;
27
28class ViolationConcernedPeopleDictionary extends SimpleDictionary
29{
30    public const PEOPLE_EMPLOYEE       = 'employee';
31    public const PEOPLE_USER           = 'user';
32    public const PEOPLE_MEMBER         = 'member';
33    public const PEOPLE_STUDENT        = 'student';
34    public const PEOPLE_MILITARY       = 'military';
35    public const PEOPLE_CUSTOMER       = 'customer';
36    public const PEOPLE_PATIENT        = 'patient';
37    public const PEOPLE_MINOR          = 'minor';
38    public const PEOPLE_VULNERABLE     = 'vulnerable';
39    public const PEOPLE_NOT_DETERMINED = 'not_determined';
40    public const PEOPLE_OTHER          = 'other';
41
42    public function __construct()
43    {
44        parent::__construct('registry_violation_concerned_people', self::getConcernedPeople());
45    }
46
47    /**
48     * Get an array of Concerned people.
49     *
50     * @return array
51     */
52    public static function getConcernedPeople()
53    {
54        return [
55            self::PEOPLE_EMPLOYEE       => 'Employés',
56            self::PEOPLE_USER           => 'Utilisateurs',
57            self::PEOPLE_MEMBER         => 'Adhérents',
58            self::PEOPLE_STUDENT        => 'Étudiants / élèves',
59            self::PEOPLE_MILITARY       => 'Personnel militaire',
60            self::PEOPLE_CUSTOMER       => 'Clients (actuels ou potentiels)',
61            self::PEOPLE_PATIENT        => 'Patients',
62            self::PEOPLE_MINOR          => 'Mineurs',
63            self::PEOPLE_VULNERABLE     => 'Personnes vulnérables',
64            self::PEOPLE_NOT_DETERMINED => 'Pas déterminé pour le moment',
65            self::PEOPLE_OTHER          => 'Autres',
66        ];
67    }
68
69    /**
70     * Get keys of the Concerned people array.
71     *
72     * @return array
73     */
74    public static function getConcernedPeopleKeys()
75    {
76        return \array_keys(self::getConcernedPeople());
77    }
78}