Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
22 / 22
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
ViolationConcernedDataDictionary
100.00% covered (success)
100.00%
22 / 22
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
 getConcernedData
100.00% covered (success)
100.00%
20 / 20
100.00% covered (success)
100.00%
1 / 1
1
 getConcernedDataKeys
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 ViolationConcernedDataDictionary extends SimpleDictionary
29{
30    public const DATA_CIVIL_STATUS                  = 'civil_status';
31    public const DATA_SOCIAL_NUMBER                 = 'social_number';
32    public const DATA_CONTACT                       = 'contact';
33    public const DATA_IDENTIFICATION_ACCESS         = 'indentification_access';
34    public const DATA_FINANCIAL                     = 'financial';
35    public const DATA_OFFICIAL_DOCUMENT             = 'official_document';
36    public const DATA_LOCATION                      = 'location';
37    public const DATA_OFFENSES_CONVICTIONS_SECURITY = 'offenses_convictions_security';
38    public const DATA_UNKNOWN                       = 'unknown';
39    public const DATA_RACIAL_ETHNIC                 = 'racial_ethnic';
40    public const DATA_POLITICAL                     = 'political';
41    public const DATA_PHILOSOPHICAL_RELIGIOUS       = 'philosophical_religious';
42    public const DATA_TRADE_UNION_MEMBERSHIP        = 'trade_union_membership';
43    public const DATA_SEXUAL_ORIENTATION            = 'sexual_orientation';
44    public const DATA_HEALTH                        = 'health';
45    public const DATA_BIOMETRIC                     = 'biometric';
46    public const DATA_GENETIC                       = 'genetic';
47    public const DATA_OTHER                         = 'other';
48
49    public function __construct()
50    {
51        parent::__construct('registry_violation_concerned_data', self::getConcernedData());
52    }
53
54    /**
55     * Get an array of Concerned data.
56     *
57     * @return array
58     */
59    public static function getConcernedData()
60    {
61        return [
62            self::DATA_CIVIL_STATUS                  => 'État civil (nom, sexe, date de naissance, âge...)',
63            self::DATA_SOCIAL_NUMBER                 => 'NIR (Numéro de sécurité sociale)',
64            self::DATA_CONTACT                       => 'Coordonnées (adresse postale ou électronique, numéros de téléphone fixe ou portable...)',
65            self::DATA_IDENTIFICATION_ACCESS         => 'Données d’identification ou d’accès (identifiant, mot de passe, numéro client...)',
66            self::DATA_FINANCIAL                     => 'Données relatives à des informations financières (revenus, numéro de carte de crédit, coordonnées bancaires), économiques',
67            self::DATA_OFFICIAL_DOCUMENT             => 'Documents officiels (Passeports, pièces d’identité, etc.)',
68            self::DATA_LOCATION                      => 'Données de localisation',
69            self::DATA_OFFENSES_CONVICTIONS_SECURITY => 'Données relatives à des infractions, condamnations, mesures de sûreté',
70            self::DATA_UNKNOWN                       => 'Les données concernées ne sont pas connues pour le moment',
71            self::DATA_RACIAL_ETHNIC                 => 'Origine raciale ou ethnique',
72            self::DATA_POLITICAL                     => 'Opinions politiques',
73            self::DATA_PHILOSOPHICAL_RELIGIOUS       => 'Opinions philosophiques ou religieuses',
74            self::DATA_TRADE_UNION_MEMBERSHIP        => 'Appartenance syndicale',
75            self::DATA_SEXUAL_ORIENTATION            => 'Orientation sexuelle',
76            self::DATA_HEALTH                        => 'Données de santé',
77            self::DATA_BIOMETRIC                     => 'Données biométriques',
78            self::DATA_GENETIC                       => 'Données génétiques',
79            self::DATA_OTHER                         => 'La violation concerne d\'autres données',
80        ];
81    }
82
83    /**
84     * Get keys of the Concerned data array.
85     *
86     * @return array
87     */
88    public static function getConcernedDataKeys()
89    {
90        return \array_keys(self::getConcernedData());
91    }
92}