Impersonated::getImpersonationUser()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
namespace Scif\LaravelPretend\Event;
4
5
use Illuminate\Contracts\Auth\Authenticatable;
6
use Illuminate\Queue\SerializesModels;
7
8
class Impersonated
9
{
10
    use SerializesModels;
11
12
    /** @var  Authenticatable */
13
    protected $realUser;
14
15
    /** @var  Authenticatable */
16
    protected $impersonationUser;
17
18 2
    public function __construct(Authenticatable $realUser, Authenticatable $impersonationUser)
19
    {
20 2
        $this->realUser          = $realUser;
21 2
        $this->impersonationUser = $impersonationUser;
22 2
    }
23
24 2
    public function getRealUser(): Authenticatable
25
    {
26 2
        return $this->realUser;
27
    }
28
29 2
    public function getImpersonationUser(): Authenticatable
30
    {
31 2
        return $this->impersonationUser;
32
    }
33
}
34