Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
33.33% covered (danger)
33.33%
7 / 21
33.33% covered (danger)
33.33%
5 / 15
CRAP
0.00% covered (danger)
0.00%
0 / 1
Processus
33.33% covered (danger)
33.33%
7 / 21
33.33% covered (danger)
33.33%
5 / 15
91.85
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
 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
 getCouleur
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setCouleur
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getDescription
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setDescription
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getPosition
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setPosition
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 addQuestion
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 removeQuestion
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
6
 getQuestions
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getConformites
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setConformites
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Domain\Registry\Model\ConformiteOrganisation;
4
5use Ramsey\Uuid\Uuid;
6use Ramsey\Uuid\UuidInterface;
7
8class Processus
9{
10    /**
11     * @var UuidInterface
12     */
13    private $id;
14
15    /**
16     * @var string|null
17     */
18    private $nom;
19
20    /**
21     * @var string|null
22     */
23    private $couleur;
24
25    /**
26     * @var string|null
27     */
28    private $description;
29
30    /**
31     * @var int|null
32     */
33    private $position;
34
35    /**
36     * @var iterable
37     */
38    private $questions;
39
40    /**
41     * @var iterable
42     */
43    private $conformites;
44
45    /**
46     * Domain constructor.
47     *
48     * @throws \Exception
49     */
50    public function __construct()
51    {
52        $this->id          = Uuid::uuid4();
53        $this->questions   = [];
54        $this->conformites = [];
55    }
56
57    public function getId(): UuidInterface
58    {
59        return $this->id;
60    }
61
62    public function getNom(): ?string
63    {
64        return $this->nom;
65    }
66
67    public function setNom(?string $nom): void
68    {
69        $this->nom = $nom;
70    }
71
72    public function getCouleur(): ?string
73    {
74        return $this->couleur;
75    }
76
77    public function setCouleur(?string $couleur): void
78    {
79        $this->couleur = $couleur;
80    }
81
82    public function getDescription(): ?string
83    {
84        return $this->description;
85    }
86
87    public function setDescription(?string $description): void
88    {
89        $this->description = $description;
90    }
91
92    public function getPosition(): ?int
93    {
94        return $this->position;
95    }
96
97    public function setPosition(?int $position): void
98    {
99        $this->position = $position;
100    }
101
102    public function addQuestion(Question $question): void
103    {
104        $this->questions[] = $question;
105        $question->setProcessus($this);
106    }
107
108    public function removeQuestion(Question $question): void
109    {
110        $key = \array_search($question, $this->questions, true);
111
112        if (false === $key) {
113            return;
114        }
115
116        unset($this->questions[$key]);
117    }
118
119    public function getQuestions(): iterable
120    {
121        return $this->questions;
122    }
123
124    public function getConformites(): iterable
125    {
126        return $this->conformites;
127    }
128
129    public function setConformites(array $conformites): void
130    {
131        $this->conformites = $conformites;
132    }
133}