Completed
Pull Request — release-v2.1 (#15)
by Quentin
08:46 queued 01:14
created

AccessTokenEvent::__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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
ccs 3
cts 3
cp 1
cc 1
eloc 2
nc 1
nop 1
crap 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