Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
90.91% covered (success)
90.91%
10 / 11
66.67% covered (warning)
66.67%
2 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
ReponseDictionary
90.91% covered (success)
90.91%
10 / 11
66.67% covered (warning)
66.67%
2 / 3
3.01
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getReponses
100.00% covered (success)
100.00%
9 / 9
100.00% covered (success)
100.00%
1 / 1
1
 getReponseLabelFromKey
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Domain\Registry\Dictionary\ConformiteOrganisation;
4
5use App\Application\Dictionary\SimpleDictionary;
6
7class ReponseDictionary extends SimpleDictionary
8{
9    public const NON_CONCERNE   = -1;
10    public const INEXISTANTE    = 0;
11    public const TRES_ELOIGNEE  = 1;
12    public const PARTIELLE      = 2;
13    public const QUASI_CONFORME = 3;
14    public const MESURABLE      = 4;
15    public const REVISEE        = 5;
16
17    public function __construct()
18    {
19        parent::__construct('registry_conformite_organisation_reponse', self::getReponses());
20    }
21
22    public static function getReponses()
23    {
24        return [
25            self::NON_CONCERNE   => 'Non concerné',
26            self::INEXISTANTE    => 'Inexistante',
27            self::TRES_ELOIGNEE  => 'Très éloignée',
28            self::PARTIELLE      => 'Partielle',
29            self::QUASI_CONFORME => 'Quasi conforme',
30            self::MESURABLE      => 'Mesurable',
31            self::REVISEE        => 'Révisée',
32        ];
33    }
34
35    public static function getReponseLabelFromKey(string $key)
36    {
37        return self::getReponses()[$key];
38    }
39}