InvalidRecipientException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 6
ccs 0
cts 0
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Wearesho\Yii\Exceptions;
6
7
class InvalidRecipientException extends TokenException
8
{
9
    protected string $recipient;
10
11
    public function __construct(string $tokenRecipient, $code = 0, \Throwable $previous = null)
12
    {
13
        $message = "Token for {$tokenRecipient} did not created yet.";
14
        parent::__construct($message, $code, $previous);
15
16
        $this->recipient = $tokenRecipient;
17
    }
18
19
    public function getRecipient(): string
20
    {
21 2
        return $this->recipient;
22
    }
23
}
24