TokenCreatedEvent::getToken()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Yokai\SecurityTokenBundle\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
use Yokai\SecurityTokenBundle\Entity\Token;
7
8
/**
9
 * Event being dispatched after a Token is created.
10
 *
11
 * @author Yann Eugoné <[email protected]>
12
 */
13
class TokenCreatedEvent extends Event
14
{
15
    /**
16
     * @var Token
17
     */
18
    private $token;
19
20
    /**
21
     * @param Token $token The created token
22
     */
23 1
    public function __construct(Token $token)
24
    {
25 1
        $this->token = $token;
26 1
    }
27
28
    /**
29
     * The created token
30
     *
31
     * @return Token
32
     */
33 1
    public function getToken()
34
    {
35 1
        return $this->token;
36
    }
37
}
38