Passed
Push — master ( 555777...21ef83 )
by Sébastien
03:00
created

ProductAccessExpiredException::__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 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Security\Exception;
6
7
use DateTimeImmutable;
8
9
class ProductAccessExpiredException extends \RuntimeException implements ProductAccessExceptionInterface
10
{
11
    /**
12
     * @var DateTimeImmutable
13
     */
14
    private $expiryDate;
15
16 2
    public function __construct(string $message, DateTimeImmutable $expiryDate)
17
    {
18 2
        parent::__construct($message);
19 2
        $this->expiryDate = $expiryDate;
20 2
    }
21
22 1
    public function getExpiryDate(): DateTimeImmutable
23
    {
24 1
        return $this->expiryDate;
25
    }
26
}
27