Impersonated   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 26
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getRealUser() 0 4 1
A getImpersonationUser() 0 4 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