Test Failed
Pull Request — master (#24)
by Sergei
07:40
created

CurrentIdentity   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\User\CurrentIdentity;
6
7
use Psr\EventDispatcher\EventDispatcherInterface;
8
use Yiisoft\Auth\IdentityInterface;
9
use Yiisoft\Auth\IdentityRepositoryInterface;
10
11
final class CurrentIdentity
12
{
13
    private ?IdentityInterface $identity = null;
0 ignored issues
show
introduced by
The private property $identity is not used, and could be removed.
Loading history...
14
15
    private IdentityRepositoryInterface $identityRepository;
16
    private EventDispatcherInterface $eventDispatcher;
17
18
    public function __construct(
19
        IdentityRepositoryInterface $identityRepository,
20
        EventDispatcherInterface $eventDispatcher
21
    ) {
22
        $this->identityRepository = $identityRepository;
23
        $this->eventDispatcher = $eventDispatcher;
24
    }
25
}
26