CreateIdentity::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types = 1);
3
4
namespace PersonalGalaxy\Identity\Command;
5
6
use PersonalGalaxy\Identity\Entity\Identity\{
7
    Identity,
8
    Email,
9
    Password,
10
};
11
12
final class CreateIdentity
13
{
14
    private $identity;
15
    private $email;
16
    private $password;
17
18 3
    public function __construct(Identity $identity, Email $email, Password $password)
19
    {
20 3
        $this->identity = $identity;
21 3
        $this->email = $email;
22 3
        $this->password = $password;
23 3
    }
24
25 2
    public function identity(): Identity
26
    {
27 2
        return $this->identity;
28
    }
29
30 3
    public function email(): Email
31
    {
32 3
        return $this->email;
33
    }
34
35 2
    public function password(): Password
36
    {
37 2
        return $this->password;
38
    }
39
}
40