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

SessionDependencyProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getSessionHandler() 0 4 1
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
}