AccessTokenManager   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createAccessToken() 0 7 1
A findByAccessToken() 0 4 1
1
<?php
2
3
namespace Mailxpert\APIBundle\Model;
4
5
6
abstract class AccessTokenManager implements AccessTokenManagerInterface
7
{
8
    /**
9
     * @inheritdoc
10
     */
11
    public function createAccessToken()
12
    {
13
        $class = $this->getClass();
14
        $accessToken = new $class;
15
16
        return $accessToken;
17
    }
18
19
    /**
20
     * @param $accessToken
21
     *
22
     * @return AccessTokenInterface
23
     */
24
    public function findByAccessToken($accessToken)
25
    {
26
        return $this->findAccessTokenBy(['accessToken' => $accessToken]);
27
    }
28
}