DispatchAuthentication::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace T4web\Authentication\Listener;
4
5
use Zend\Authentication\AuthenticationService;
6
use T4web\Authentication\AuthenticationEvent;
7
8
class DispatchAuthentication
9
{
10
    /**
11
     * @var AuthenticationService
12
     */
13
    protected $authService;
14
15
    /**
16
     * @param AuthenticationService $authService
17
     */
18
    public function __construct(AuthenticationService $authService)
19
    {
20
        $this->authService = $authService;
21
    }
22
23
    public function __invoke(AuthenticationEvent $e)
24
    {
25
        $e->setResult($this->authService->authenticate($e->getAdapter()));
26
    }
27
}
28