Completed
Push — master ( 66ec7e...c9ec0a )
by Matze
07:32
created

AuthenticateUserEvent::getAuthenticationData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace BrainExe\Core\Authentication\Event;
4
5
use BrainExe\Core\Authentication\AuthenticationDataVO;
6
use BrainExe\Core\EventDispatcher\AbstractEvent;
7
8
/**
9
 * @api
10
 */
11
class AuthenticateUserEvent extends AbstractEvent
12
{
13
14
    const CHECK         = 'authenticate.check';
15
    const AUTHENTICATED = 'authenticate.authenticated';
16
    const FAILED        = 'authenticate.failed';
17
18
    /**
19
     * @var AuthenticationDataVO
20
     */
21
    private $authenticationData;
22
23
    /**
24
     * @param AuthenticationDataVO $authentication
25
     * @param string $eventName
26
     */
27
    public function __construct(AuthenticationDataVO $authentication, string $eventName)
28
    {
29
        parent::__construct($eventName);
30
31
        $this->authenticationData = $authentication;
32
    }
33
34
    /**
35
     * @return AuthenticationDataVO
36
     */
37
    public function getAuthenticationData() : AuthenticationDataVO
38
    {
39
        return $this->authenticationData;
40
    }
41
}
42