Passed
Branch master (046a17)
by Mathieu
02:22
created

AbstractField   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getSettings() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Neimheadh\SonataAnnotationBundle\Annotation;
6
7
/**
8
 * Field annotations main class.
9
 *
10
 * @author Marko Kunic <[email protected]>
11
 * @author Mathieu Wambre <[email protected]>
12
 */
13
abstract class AbstractField implements AnnotationInterface
14
{
15
    /**
16
     * @var string
17
     */
18
    public string $type;
19
20
    /**
21
     * @var array
22
     */
23
    public array $fieldDescriptionOptions = [];
24
25
    /**
26
     * Get field settings.
27
     *
28
     * @return array
29
     */
30
    public function getSettings(): array
31
    {
32
        return [
33
            $this->type ?? null,
34
            $this->fieldDescriptionOptions
35
        ];
36
    }
37
}
38