Completed
Push — standalone ( 8da518...787e4c )
by Philip
09:19
created

DefaultAccessTokenAuthenticator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

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 28
    public function __construct(AccessTokenRepositoryInterface $service)
12
    {
13 28
        $this->service = $service;
14 28
    }
15
16
    /**
17
     * {@inheritdoc}
18
     */
19 16
    protected function findUserByToken($token)
20
    {
21 16
        return $this->service->findUserByToken($token);
22
    }
23
}
24