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

AuthenticateUserEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getAuthenticationData() 0 4 1
A __construct() 0 6 1
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