Completed
Pull Request — master (#525)
by
unknown
04:25
created

AfterFieldCreation   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 46
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getForm() 0 3 1
A getField() 0 3 1
1
<?php
2
3
namespace Kris\LaravelFormBuilder\Events;
4
5
use Kris\LaravelFormBuilder\Fields\FormField;
6
use Kris\LaravelFormBuilder\Form;
7
8
class AfterFieldCreation
9
{
10
    /**
11
     * The form instance.
12
     *
13
     * @var Form
14
     */
15
    protected $form;
16
17
    /**
18
     * The field instance.
19
     *
20
     * @var FormField
21
     */
22
    protected $field;
23
24
    /**
25
     * Create a new after field creation instance.
26
     *
27
     * @param Form $form
28
     * @param FormField $field
29
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
30
     */
31
    public function __construct(Form $form, FormField $field) {
32
        $this->form = $form;
33
        $this->field = $field;
34
    }
35
36
    /**
37
     * Return the event's form.
38
     *
39
     * @return Form
40
     */
41
    public function getForm() {
42
        return $this->form;
43
    }
44
45
    /**
46
     * Return the event's field.
47
     *
48
     * @return FormField
49
     */
50
    public function getField() {
51
        return $this->field;
52
    }
53
}
54