Completed
Push — standalone ( 57bbfc...ea253f )
by Philip
03:00
created

DefaultAccessTokenAuthenticator::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 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 22
    public function __construct(AccessTokenRepositoryInterface $service)
12
    {
13 22
        $this->service = $service;
14 22
    }
15
16
    /**
17
     * {@inheritdoc}
18
     */
19 14
    protected function findUserByToken($token)
20
    {
21 14
        return $this->service->findUserByToken($token);
22
    }
23
}
24