Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
39.13% covered (danger)
39.13%
9 / 23
40.91% covered (danger)
40.91%
9 / 22
CRAP
0.00% covered (danger)
0.00%
0 / 1
AbstractScenarioMenace
39.13% covered (danger)
39.13%
9 / 23
40.91% covered (danger)
40.91%
9 / 22
131.16
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
 __clone
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 deserialize
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getId
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getNom
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setNom
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getMesuresProtections
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setMesuresProtections
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 isVisible
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setIsVisible
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isDisponibilite
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setIsDisponibilite
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isIntegrite
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setIsIntegrite
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isConfidentialite
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setIsConfidentialite
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getVraisemblance
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setVraisemblance
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getGravite
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setGravite
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getPrecisions
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setPrecisions
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace App\Domain\AIPD\Model;
6
7use App\Domain\AIPD\Dictionary\VraisemblanceGraviteDictionary;
8use Doctrine\ORM\PersistentCollection;
9use JMS\Serializer\Annotation as Serializer;
10use Ramsey\Uuid\Uuid;
11use Ramsey\Uuid\UuidInterface;
12
13/**
14 * @Serializer\ExclusionPolicy("none")
15 */
16abstract class AbstractScenarioMenace
17{
18    /**
19     * @Serializer\Exclude
20     */
21    protected UuidInterface $id;
22
23    protected string $nom;
24
25    /**
26     * @var array|PersistentCollection|AnalyseMesureProtection[]|ModeleMesureProtection[]
27     *
28     * @Serializer\Type("array<App\Domain\AIPD\Model\ModeleMesureProtection>")
29     */
30    protected $mesuresProtections;
31
32    protected bool $isVisible;
33    protected bool $isDisponibilite;
34    protected bool $isIntegrite;
35    protected bool $isConfidentialite;
36    /**
37     * @see VraisemblanceGraviteDictionary
38     */
39    protected string $vraisemblance;
40    /**
41     * @see VraisemblanceGraviteDictionary
42     */
43    protected string $gravite;
44    protected ?string $precisions;
45
46    public function __construct()
47    {
48        $this->id = Uuid::uuid4();
49    }
50
51    public function __clone()
52    {
53        $this->id                 = Uuid::uuid4();
54        $this->mesuresProtections = (clone $this->mesuresProtections)->toArray();
55    }
56
57    public function deserialize(): void
58    {
59        $this->id = Uuid::uuid4();
60    }
61
62    public function getId(): UuidInterface
63    {
64        return $this->id;
65    }
66
67    public function getNom()
68    {
69        return $this->nom;
70    }
71
72    public function setNom($nom): void
73    {
74        $this->nom = $nom;
75    }
76
77    public function getMesuresProtections()
78    {
79        return $this->mesuresProtections;
80    }
81
82    public function setMesuresProtections($mesureProtections): void
83    {
84        $this->mesuresProtections = $mesureProtections;
85    }
86
87    public function isVisible(): bool
88    {
89        return $this->isVisible;
90    }
91
92    public function setIsVisible(bool $isVisible): void
93    {
94        $this->isVisible = $isVisible;
95    }
96
97    public function isDisponibilite(): bool
98    {
99        return $this->isDisponibilite;
100    }
101
102    public function setIsDisponibilite(bool $isDisponibilite): void
103    {
104        $this->isDisponibilite = $isDisponibilite;
105    }
106
107    public function isIntegrite(): bool
108    {
109        return $this->isIntegrite;
110    }
111
112    public function setIsIntegrite(bool $isIntegrite): void
113    {
114        $this->isIntegrite = $isIntegrite;
115    }
116
117    public function isConfidentialite(): bool
118    {
119        return $this->isConfidentialite;
120    }
121
122    public function setIsConfidentialite(bool $isConfidentialite): void
123    {
124        $this->isConfidentialite = $isConfidentialite;
125    }
126
127    public function getVraisemblance()
128    {
129        return $this->vraisemblance;
130    }
131
132    public function setVraisemblance($vraisemblance): void
133    {
134        $this->vraisemblance = $vraisemblance;
135    }
136
137    public function getGravite()
138    {
139        return $this->gravite;
140    }
141
142    public function setGravite($gravite): void
143    {
144        $this->gravite = $gravite;
145    }
146
147    public function getPrecisions(): ?string
148    {
149        return $this->precisions;
150    }
151
152    public function setPrecisions(?string $precisions): void
153    {
154        $this->precisions = $precisions;
155    }
156}