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

Impersonated   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
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 27
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 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
}