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

CurrentIdentity::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 6
rs 10
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