Passed
Push — master ( 956624...05ed8c )
by Bertrand
08:49
created

PractiseVo::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 5
rs 10
1
<?php
2
3
4
namespace App\Src\UseCases\Domain\Context\Dto;
5
6
7
class PractiseVo
8
{
9
    private $pageId;
10
    private $label;
11
    private $doneAt;
12
13
    public function __construct(int $pageId, string $label, \DateTime $doneAt = null)
14
    {
15
        $this->pageId = $pageId;
16
        $this->label = $label;
17
        $this->doneAt = $doneAt;
18
    }
19
20
    public function doneAt():?\DateTime
21
    {
22
        return $this->doneAt;
23
    }
24
25
    public function toArray()
26
    {
27
        return [
28
            'page_id' => $this->pageId,
29
            'label' => $this->label,
30
        ];
31
    }
32
}
33