Completed
Branch develop (6fd611)
by Quentin
02:32
created

AccessTokenEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAccessToken() 0 4 1
1
<?php
2
3
namespace Majora\Component\OAuth\Event;
4
5
use Majora\Component\OAuth\Model\AccessTokenInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8
/**
9
 * AccessTokenInterface specific event class.
10
 */
11
class AccessTokenEvent extends Event
12
{
13
    /**
14
     * @var AccessTokenInterface
15
     */
16
    protected $accessToken;
17
18
    /**
19
     * construct.
20
     *
21
     * @param AccessTokenInterface $accessToken
22
     */
23 14
    public function __construct(AccessTokenInterface $accessToken)
24
    {
25 14
        $this->accessToken = $accessToken;
26 14
    }
27
28
    /**
29
     * return related access token.
30
     *
31
     * @return AccessTokenInterface
32
     */
33 2
    public function getAccessToken()
34
    {
35 2
        return $this->accessToken;
36
    }
37
}
38