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

AbstractField::getSettings()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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