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

PractiseVo   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 23
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A doneAt() 0 3 1
A toArray() 0 5 1
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