Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
ViolationOriginDictionary
100.00% covered (success)
100.00%
14 / 14
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
 getOrigins
100.00% covered (success)
100.00%
12 / 12
100.00% covered (success)
100.00%
1 / 1
1
 getOriginsKeys
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 ViolationOriginDictionary extends SimpleDictionary
29{
30    public const ORIGIN_LOST_STOLEN_EQUIPMENT       = 'lost_stolen_equipement';
31    public const ORIGIN_LOST_STOLEN_PAPER           = 'lost_stolen_paper';
32    public const ORIGIN_LOST_OPENED_MAIL            = 'lost_opened_mail';
33    public const ORIGIN_HACK                        = 'hack';
34    public const ORIGIN_TRASH_CONFIDENTIAL_DOCUMENT = 'trash_confidential_document';
35    public const ORIGIN_TRASH_CONFIDENTIAL_DEVICE   = 'trash_confidential_device';
36    public const ORIGIN_NON_VOLUNTARY_PUBLICATION   = 'non_voluntary_publication';
37    public const ORIGIN_BAD_PEOPLE_DATA_DISPLAY     = 'bad_people_data_display';
38    public const ORIGIN_BAD_RECIPIENT_DATA          = 'bad_recipient';
39    public const ORIGIN_VERBALLY_DISCLOSED          = 'verbally_disclosed';
40
41    public function __construct()
42    {
43        parent::__construct('registry_violation_origin', self::getOrigins());
44    }
45
46    /**
47     * Get an array of Origins.
48     *
49     * @return array
50     */
51    public static function getOrigins()
52    {
53        return [
54            self::ORIGIN_LOST_STOLEN_EQUIPMENT       => 'Equipement perdu ou volé',
55            self::ORIGIN_LOST_STOLEN_PAPER           => 'Papier perdu, volé ou laissé accessible dans un endroit non sécurisé',
56            self::ORIGIN_LOST_OPENED_MAIL            => 'Courrier perdu ou ouvert avant d\'être retourné à l\'envoyeur',
57            self::ORIGIN_HACK                        => 'Piratage, logiciel malveillant, hameçonnage',
58            self::ORIGIN_TRASH_CONFIDENTIAL_DOCUMENT => 'Mise au rebut de documents papier contenant des données personnelles sans destruction physique',
59            self::ORIGIN_TRASH_CONFIDENTIAL_DEVICE   => 'Mise au rebut d’appareils numériques contenant des données personnelles sans effacement sécurisé',
60            self::ORIGIN_NON_VOLUNTARY_PUBLICATION   => 'Publication non volontaire d\'informations',
61            self::ORIGIN_BAD_PEOPLE_DATA_DISPLAY     => 'Données de la mauvaise personne affichées sur le portail du client',
62            self::ORIGIN_BAD_RECIPIENT_DATA          => 'Données personnelles envoyées à un mauvais destinataire',
63            self::ORIGIN_VERBALLY_DISCLOSED          => 'Informations personnelles divulguées de façon verbale',
64        ];
65    }
66
67    /**
68     * Get keys of the Origins array.
69     *
70     * @return array
71     */
72    public static function getOriginsKeys()
73    {
74        return \array_keys(self::getOrigins());
75    }
76}