FormEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 25
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getForm() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the 2amigos/yii2-usuario project.
5
 *
6
 * (c) 2amigOS! <http://2amigos.us/>
7
 *
8
 * For the full copyright and license information, please view
9
 * the LICENSE file that was distributed with this source code.
10
 */
11
12
namespace Da\User\Event;
13
14
use yii\base\Event;
15
use yii\base\Model;
16
17
/**
18
 * @property-read Model $form
19
 */
20
class FormEvent extends Event
21
{
22
    const EVENT_BEFORE_REQUEST = 'beforeRequest';
23
    const EVENT_AFTER_REQUEST = 'afterRequest';
24
    const EVENT_BEFORE_RESEND = 'beforeResend';
25
    const EVENT_AFTER_RESEND = 'afterResend';
26
    const EVENT_BEFORE_LOGIN = 'beforeLogin';
27
    const EVENT_AFTER_LOGIN = 'afterLogin';
28
    const EVENT_BEFORE_REGISTER = 'beforeRegister';
29
    const EVENT_AFTER_REGISTER = 'afterRegister';
30
    const EVENT_FAILED_LOGIN = 'failedLogin';
31
32
    protected $form;
33
34 11
    public function __construct(Model $form, array $config = [])
35
    {
36 11
        $this->form = $form;
37 11
        parent::__construct($config);
38 11
    }
39
40
    public function getForm()
41
    {
42
        return $this->form;
43
    }
44
}
45