Completed
Pull Request — release-v2.1 (#15)
by Quentin
08:46 queued 01:14
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 AccessTokenInterfaceInterface
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;
0 ignored issues
show
Documentation Bug introduced by
It seems like $accessToken of type object<Majora\Component\...l\AccessTokenInterface> is incompatible with the declared type object<Majora\Component\...okenInterfaceInterface> of property $accessToken.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
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