Passed
Pull Request — master (#116)
by Arnaud
03:38
created

FieldDefinition::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace LAG\AdminBundle\Field\Definition;
4
5
class FieldDefinition implements FieldDefinitionInterface
6
{
7
    /**
8
     * @var string
9
     */
10
    private $type;
11
12
    /**
13
     * @var array
14
     */
15
    private $options;
16
17
    /**
18
     * @var array
19
     */
20
    private $formOptions;
21
22
    public function __construct(string $type, array $options = [], array $formOptions = [])
23
    {
24
        $this->type = $type;
25
        $this->options = $options;
26
        $this->formOptions = $formOptions;
27
    }
28
29
    public function getType(): ?string
30
    {
31
        return $this->type;
32
    }
33
34
    public function getOptions(): array
35
    {
36
        return $this->options;
37
    }
38
39
    /**
40
     * @return array
41
     */
42
    public function getFormOptions(): array
43
    {
44
        return $this->formOptions;
45
    }
46
}
47