Passed
Push — develop ( 355f63...51016a )
by Mathieu
02:23
created

AssociationFieldTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
dl 0
loc 24
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
namespace Neimheadh\SonataAnnotationBundle\Annotation;
4
5
/**
6
 * Association field trait.
7
 */
8
trait AssociationFieldTrait
9
{
10
11
    /**
12
     * Association field name.
13
     *
14
     * @var string|null
15
     */
16
    public ?string $field = null;
17
18
    /**
19
     * {@inheritDoc}
20
     *
21
     * @param string|null $field Association field name.
22
     */
23
    public function __construct(
24
        $type = null,
25
        array $fieldDescriptionOptions = [],
26
        ?int $position = null,
27
        ?string $field = null
28
    ) {
29
        $this->field = $field;
30
31
        parent::__construct($type, $fieldDescriptionOptions, $position);
32
    }
33
34
}