Completed
Push — develop ( ccfc23...3b27a1 )
by Baptiste
02:20
created

IdentityAlreadyExist::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types = 1);
3
4
namespace PersonalGalaxy\Identity\Exception;
5
6
use PersonalGalaxy\Identity\Entity\Identity\Email;
7
8
final class IdentityAlreadyExist extends RuntimeException
9
{
10
    private $email;
11
12 1
    public function __construct(Email $email)
13
    {
14 1
        $this->email = $email;
15 1
        parent::__construct((string) $email);
16 1
    }
17
18 1
    public function email(): Email
19
    {
20 1
        return $this->email;
21
    }
22
}
23