Test Setup Failed
Push — master ( 6863da...811519 )
by guillaume
27:05 queued 21:33
created

UserDto   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 16
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A toArray() 0 5 1
1
<?php
2
3
4
namespace App\Src\UseCases\Domain\Users;
5
6
7
class UserDto
8
{
9
    private $identity;
10
    private $state;
11
12
    public function __construct(Identity $identity, State $state)
13
    {
14
        $this->identity = $identity;
15
        $this->state = $state;
16
    }
17
18
    public function toArray()
19
    {
20
        return array_merge(
21
            $this->identity->toArray(),
22
            $this->state->toArray()
23
        );
24
    }
25
}
26