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

FieldDefinition   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 3 1
A getFormOptions() 0 3 1
A __construct() 0 5 1
A getOptions() 0 3 1
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