Completed
Push — master ( f82a9f...84b7ee )
by Alexander
03:23
created

Impersonated::__construct()   A

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
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
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 1
    public function __construct(Authenticatable $realUser, Authenticatable $impersonationUser)
19
    {
20 1
        $this->realUser          = $realUser;
21 1
        $this->impersonationUser = $impersonationUser;
22 1
    }
23
24 1
    public function getRealUser(): Authenticatable
25
    {
26 1
        return $this->realUser;
27
    }
28
29 1
    public function getImpersonationUser(): Authenticatable
30
    {
31 1
        return $this->impersonationUser;
32
    }
33
34
}