Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
80.00% covered (warning)
80.00%
8 / 10
80.00% covered (warning)
80.00%
8 / 10
CRAP
0.00% covered (danger)
0.00%
0 / 1
Maturity
80.00% covered (warning)
80.00%
8 / 10
80.00% covered (warning)
80.00%
8 / 10
10.80
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
 getId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getDomain
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setDomain
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getScore
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setScore
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getSurvey
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setSurvey
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getReferentiel
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setReferentiel
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\Maturity\Model;
25
26use Ramsey\Uuid\Uuid;
27use Ramsey\Uuid\UuidInterface;
28
29class Maturity
30{
31    /**
32     * @var UuidInterface
33     */
34    private $id;
35
36    /**
37     * @var Referentiel|null
38     */
39    private $referentiel;
40
41    /**
42     * @var int|null
43     */
44    private $score;
45
46    /**
47     * @var Survey|null
48     */
49    private $survey;
50
51    /**
52     * @var Domain|null
53     */
54    private $domain;
55
56    /**
57     * Maturity constructor.
58     *
59     * @throws \Exception
60     */
61    public function __construct()
62    {
63        $this->id = Uuid::uuid4();
64    }
65
66    public function getId(): UuidInterface
67    {
68        return $this->id;
69    }
70
71    public function getDomain(): ?Domain
72    {
73        return $this->domain;
74    }
75
76    public function setDomain(?Domain $domain): void
77    {
78        $this->domain = $domain;
79    }
80
81    public function getScore(): ?int
82    {
83        return $this->score;
84    }
85
86    public function setScore(?int $score): void
87    {
88        $this->score = $score;
89    }
90
91    public function getSurvey(): ?Survey
92    {
93        return $this->survey;
94    }
95
96    public function setSurvey(?Survey $survey): void
97    {
98        $this->survey = $survey;
99    }
100
101    public function getReferentiel(): ?Referentiel
102    {
103        return $this->referentiel;
104    }
105
106    public function setReferentiel(?Referentiel $referentiel): void
107    {
108        $this->referentiel = $referentiel;
109    }
110}