Test Failed
Push — master ( 5a7161...8dd580 )
by Mike
02:25
created

SessionDependencyProvider::getSessionHandler()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace App\Session;
5
6
7
use Xervice\Redis\Session\RedisSessionHandler;
8
use Xervice\Session\SessionDependencyProvider as XerviceSessionDependencyProvider;
9
10
class SessionDependencyProvider extends XerviceSessionDependencyProvider
11
{
12
13
    /**
14
     * @return \SessionHandlerInterface
15
     */
16
    protected function getSessionHandler(): \SessionHandlerInterface
17
    {
18
        return new RedisSessionHandler(
19
            $this->getLocator()->redis()->client()
0 ignored issues
show
Bug introduced by
It seems like $this->getLocator()->redis()->client() can also be of type Xervice\Core\Client\EmptyClient; however, parameter $client of Xervice\Redis\Session\Re...nHandler::__construct() does only seem to accept Xervice\Redis\RedisClient, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

19
            /** @scrutinizer ignore-type */ $this->getLocator()->redis()->client()
Loading history...
20
        );
21
    }
22
23
}