Completed
Push — master ( 4d4acb...f95c98 )
by Kristijan
12s
created

BeforeFormValidation   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 35
rs 10
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getForm() 0 3 1
A getValidator() 0 3 1
1
<?php namespace Kris\LaravelFormBuilder\Events;
2
3
use Illuminate\Contracts\Validation\Validator;
4
use Kris\LaravelFormBuilder\Form;
5
6
class BeforeFormValidation {
7
8
    /**
9
     * @var $form Form
10
     */
11
    protected $form;
12
13
    /**
14
     * @var $validator Validator
15
     */
16
    protected $validator;
17
18
    /**
19
     * Create a new event instance.
20
     */
21
    public function __construct(Form $form, Validator $validator) {
22
        $this->form = $form;
23
        $this->validator = $validator;
24
    }
25
26
    /**
27
     * Return the event's form.
28
     */
29
    public function getForm() {
30
        return $this->form;
31
    }
32
33
    /**
34
     * Return the event's validator.
35
     */
36
    public function getValidator() {
37
        return $this->validator;
38
    }
39
40
}
41