AuthenticatorHandlerTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A withHandler() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of php-scaffold
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
declare(strict_types=1);
11
12
namespace Slick\WebStack\Infrastructure\Http\Authenticator;
13
14
use Slick\WebStack\Domain\Security\Http\Authenticator\AuthenticatorHandlerInterface;
15
use Slick\WebStack\Domain\Security\Http\AuthenticatorInterface;
16
17
/**
18
 * AuthenticatorHandlerTrait
19
 *
20
 * @package Slick\WebStack\Infrastructure\Http\Authenticator
21
 */
22
trait AuthenticatorHandlerTrait
23
{
24
25
    protected AuthenticatorHandlerInterface $handler;
26
27
    /**
28
     * @inheritDoc
29
     */
30
    public function withHandler(AuthenticatorHandlerInterface $handler): AuthenticatorInterface
31
    {
32
        $this->handler = $handler;
33
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type Slick\WebStack\Infrastru...thenticatorHandlerTrait which is incompatible with the type-hinted return Slick\WebStack\Domain\Se...\AuthenticatorInterface.
Loading history...
34
    }
35
}
36