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

AfterFieldCreation::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
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