Completed
Push — standalone ( a7b79f...57bbfc )
by Philip
02:45
created

DefaultAccessTokenAuthenticator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 17
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A findUserByToken() 0 4 1
1
<?php
2
3
namespace Dontdrinkandroot\RestBundle\Security;
4
5
use Dontdrinkandroot\RestBundle\Repository\AccessTokenRepositoryInterface;
6
7
class DefaultAccessTokenAuthenticator extends AbstractAccessTokenAuthenticator
8
{
9
    private $service;
10
11
    public function __construct(AccessTokenRepositoryInterface $service)
12
    {
13
        $this->service = $service;
14
    }
15
16
    /**
17
     * {@inheritdoc}
18
     */
19
    protected function findUserByToken($token)
20
    {
21
        return $this->service->findUserByToken($token);
22
    }
23
}
24